From 11cd572486dbf7238950d9cf28dd37abfee397ae Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Tue, 7 Mar 2023 22:48:12 +0100 Subject: [PATCH] Add waybar service --- files/config/systemd/user/waybar.service | 14 ++++++++++++++ playbook.yml | 5 ++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 files/config/systemd/user/waybar.service diff --git a/files/config/systemd/user/waybar.service b/files/config/systemd/user/waybar.service new file mode 100644 index 0000000..340238d --- /dev/null +++ b/files/config/systemd/user/waybar.service @@ -0,0 +1,14 @@ +[Unit] +Description=Highly customizable Wayland bar for Sway and Wlroots based compositors. +Documentation=https://github.com/Alexays/Waybar/wiki/ +PartOf=graphical-session.target +After=graphical-session.target +Requisite=sway-session.target + +[Service] +ExecStart=/usr/bin/waybar +ExecReload=kill -SIGUSR2 $MAINPID +Restart=on-failure + +[Install] +WantedBy=sway-session.target diff --git a/playbook.yml b/playbook.yml index 84f1e41..67cbff4 100644 --- a/playbook.yml +++ b/playbook.yml @@ -115,8 +115,11 @@ - name: Activate Import Gsettings service ansible.builtin.systemd: - name: 'import-gsettings.service' + name: '{{ item }}' scope: user state: started + loop: + - import-gsettings.service + - waybar.service when: service_file is changed and not ansible_check_mode