diff options
| author | 2026-05-13 13:43:19 +0100 | |
|---|---|---|
| committer | 2026-05-13 13:43:19 +0100 | |
| commit | 52970b1bdb37aaf043c10a151b3ae6f680c174b1 (patch) | |
| tree | 24da70996be869455d6892efc7b2fd50e8171c32 /dot_config/systemd | |
| parent | 1e648128c729319f0472d993bb623928c117744c (diff) | |
| download | dotfiles-52970b1bdb37aaf043c10a151b3ae6f680c174b1.tar.gz dotfiles-52970b1bdb37aaf043c10a151b3ae6f680c174b1.tar.bz2 dotfiles-52970b1bdb37aaf043c10a151b3ae6f680c174b1.zip | |
refactor(sway): manage waybar via systemd user service
Move waybar from sway's inline bar {} block to waybar.service pulled in
by sway-session.target. Matches the pattern for mako, swayidle,
poweralertd, display-watcher, cliphist. ExecReload sends SIGUSR2 so
'systemctl --user reload waybar' picks up config changes without a
restart.
Diffstat (limited to 'dot_config/systemd')
| -rw-r--r-- | dot_config/systemd/user/sway-session.target | 2 | ||||
| -rw-r--r-- | dot_config/systemd/user/waybar.service | 16 |
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 |
