From 447b27af63ee516a08b743af1e256b23785cefe9 Mon Sep 17 00:00:00 2001 From: nevaforget <> Date: Mon, 31 Aug 2026 12:55:07 +0200 Subject: [PATCH] feat(quickshell): run it as a systemd user service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit spawn-at-startup gave it no restart, so a crash left the session without a bar until the next login — which is what the Alt+W toggle used to paper over. --- defaults/etc/systemd/user/quickshell.service | 16 ++++++++++++++++ defaults/xdg/niri/config.kdl | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 defaults/etc/systemd/user/quickshell.service diff --git a/defaults/etc/systemd/user/quickshell.service b/defaults/etc/systemd/user/quickshell.service new file mode 100644 index 0000000..7eae2f8 --- /dev/null +++ b/defaults/etc/systemd/user/quickshell.service @@ -0,0 +1,16 @@ +# ABOUTME: systemd user service for the Quickshell bar, launcher and popouts. +# ABOUTME: Replaces the spawn-at-startup in niri's config.kdl, which never restarted it. + +[Unit] +Description=Quickshell bar and shell +PartOf=graphical-session.target +After=graphical-session.target + +[Service] +Type=simple +ExecStart=/usr/bin/quickshell -c moonarch +Restart=on-failure +RestartSec=3 + +[Install] +WantedBy=graphical-session.target diff --git a/defaults/xdg/niri/config.kdl b/defaults/xdg/niri/config.kdl index 908a08a..ac85534 100644 --- a/defaults/xdg/niri/config.kdl +++ b/defaults/xdg/niri/config.kdl @@ -94,8 +94,8 @@ layout { // xwayland-satellite is managed automatically since niri 25.08 // kanshi is managed via systemd user service (kanshi.service) -// Bar: quickshell is the default; Waybar stays installed as a reserve (toggle with Alt+W). -spawn-at-startup "quickshell" "-c" "moonarch" +// quickshell is managed via systemd user service (quickshell.service), which +// restarts it on a crash — spawn-at-startup left the session without a bar. // swaync disabled — quickshell owns notifications now; package kept installed as a reserve. // spawn-at-startup "swaync" spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"