aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/systemd/user
diff options
context:
space:
mode:
Diffstat (limited to 'dot_config/systemd/user')
-rw-r--r--dot_config/systemd/user/sway-session.target2
-rw-r--r--dot_config/systemd/user/waybar.service16
2 files changed, 17 insertions, 1 deletions
diff --git a/dot_config/systemd/user/sway-session.target b/dot_config/systemd/user/sway-session.target
index 0c33a40..0b1166c 100644
--- a/dot_config/systemd/user/sway-session.target
+++ b/dot_config/systemd/user/sway-session.target
@@ -2,6 +2,6 @@
Description=sway compositor session
Documentation=man:systemd.special(7)
BindsTo=graphical-session.target
-Wants=graphical-session-pre.target mako.service poweralertd.service display-watcher.service swayidle.service cliphist-text.service cliphist-image.service
+Wants=graphical-session-pre.target mako.service poweralertd.service display-watcher.service swayidle.service cliphist-text.service cliphist-image.service waybar.service
After=graphical-session-pre.target
StopWhenUnneeded=yes
diff --git a/dot_config/systemd/user/waybar.service b/dot_config/systemd/user/waybar.service
new file mode 100644
index 0000000..fb3a29e
--- /dev/null
+++ b/dot_config/systemd/user/waybar.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Waybar status bar for sway
+PartOf=graphical-session.target
+After=graphical-session.target
+ConditionEnvironment=WAYLAND_DISPLAY
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/waybar
+ExecReload=/bin/kill -SIGUSR2 $MAINPID
+Restart=on-failure
+RestartSec=2s
+KillMode=mixed
+
+[Install]
+WantedBy=sway-session.target