diff --git a/home/bin/desktop/executable_quickshell-start.sh b/home/bin/desktop/executable_quickshell-start.sh index 9c7fe41..9876e21 100644 --- a/home/bin/desktop/executable_quickshell-start.sh +++ b/home/bin/desktop/executable_quickshell-start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Start the Quickshell bar on the current Wayland session. +# Start the systemd-managed Quickshell bar on the current Wayland session. -qs -c bar kill 2>/dev/null || true -qs -c bar --daemonize +systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE +systemctl --user restart quickshell-bar.service diff --git a/home/dot_config/systemd/user/quickshell-bar.service b/home/dot_config/systemd/user/quickshell-bar.service new file mode 100644 index 0000000..93303c5 --- /dev/null +++ b/home/dot_config/systemd/user/quickshell-bar.service @@ -0,0 +1,16 @@ +[Unit] +Description=Quickshell desktop bar +Documentation=https://quickshell.org/ +After=graphical-session.target +PartOf=graphical-session.target +ConditionEnvironment=WAYLAND_DISPLAY + +[Service] +Type=simple +ExecStart=/usr/bin/qs -c bar --no-duplicate +Restart=on-failure +RestartSec=2 +TimeoutStopSec=5 + +[Install] +WantedBy=graphical-session.target