From 9a5387b6c02ae444beea58f8d6210af805753f42 Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 10 Sep 2026 19:42:57 -0700 Subject: [PATCH] feat(systemd-user): swayidle idle-lock unit with noctalia IPC fallback chain --- .../.config/systemd/user/swayidle-lock.service | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 dotfiles/systemd-user/.config/systemd/user/swayidle-lock.service diff --git a/dotfiles/systemd-user/.config/systemd/user/swayidle-lock.service b/dotfiles/systemd-user/.config/systemd/user/swayidle-lock.service new file mode 100644 index 0000000..6c40f1b --- /dev/null +++ b/dotfiles/systemd-user/.config/systemd/user/swayidle-lock.service @@ -0,0 +1,18 @@ +[Unit] +Description=swayidle idle lock (locks via noctalia-shell IPC, suspends on lid) +Documentation=https://github.com/swaywm/swayidle +After=graphical-session.target + +[Service] +# qs exists on dankware, bare noctalia CLI on blankpad; the fallback chain makes +# this one unit correct on both hosts. deploy.sh enables it only where the +# ExecStart binary resolves, so it stays inert until swayidle is installed. +ExecStart=/usr/bin/swayidle -w \ + timeout 300 'qs -c noctalia-shell ipc call lockScreen lock || noctalia msg session lock' \ + before-sleep 'qs -c noctalia-shell ipc call lockScreen lock || noctalia msg session lock' \ + after-resume 'qs -c noctalia-shell ipc call lockScreen lock || noctalia msg session lock' +Restart=on-failure +RestartSec=5s + +[Install] +WantedBy=default.target