Move waybar to a systemd service
This commit is contained in:
20
files/systemd/user/waybar.service
Normal file
20
files/systemd/user/waybar.service
Normal file
@@ -0,0 +1,20 @@
|
||||
[Unit]
|
||||
Description=Highly customizable Wayland bar for Sway and Wlroots based compositors.
|
||||
Documentation=man:waybar(5)
|
||||
# order startup after WM
|
||||
After=graphical-session.target
|
||||
|
||||
[Service]
|
||||
Type=exec
|
||||
# Repurpose XDG Autostart filtering
|
||||
ExecCondition=/lib/systemd/systemd-xdg-autostart-condition "wlroots:sway:Wayfire:labwc:Hyprland" ""
|
||||
ExecStart=/usr/bin/waybar
|
||||
ExecReload=kill -SIGUSR2 $MAINPID
|
||||
Restart=on-failure
|
||||
Slice=app-graphical.slice
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
# Alternatively can be wanted by specific WMs' targets
|
||||
# Should also be duplicated in 'After=' to avoid ordering loop
|
||||
#WantedBy=wayland-session@hyprland.desktop.target
|
Reference in New Issue
Block a user