From 6dd19b8f207887033fd77ecf624d4d4f40ce5132 Mon Sep 17 00:00:00 2001 From: Alexander Oakman Date: Tue, 23 Jul 2024 02:25:10 +0300 Subject: [PATCH] Add waybar configuration monitoring service --- usr/lib/systemd/user/waybar-restart.path | 11 +++++++++++ usr/lib/systemd/user/waybar-restart.service | 3 +++ 2 files changed, 14 insertions(+) create mode 100644 usr/lib/systemd/user/waybar-restart.path create mode 100644 usr/lib/systemd/user/waybar-restart.service diff --git a/usr/lib/systemd/user/waybar-restart.path b/usr/lib/systemd/user/waybar-restart.path new file mode 100644 index 0000000..22adfd2 --- /dev/null +++ b/usr/lib/systemd/user/waybar-restart.path @@ -0,0 +1,11 @@ +[Unit] +Description=Automatically restart the waybar when its configuration changes +PartOf=waybar.service + +[Path] +PathChanged=%h/.config/waybar +PathChanged=%h/.config/waybar/colors +PathChanged=%h/waybar/config + +[Install] +WantedBy=paths.target diff --git a/usr/lib/systemd/user/waybar-restart.service b/usr/lib/systemd/user/waybar-restart.service new file mode 100644 index 0000000..eb16529 --- /dev/null +++ b/usr/lib/systemd/user/waybar-restart.service @@ -0,0 +1,3 @@ +[Service] +ExecStart=systemctl --user restart waybar.service +Type=oneshot