feat(systemd-user): swayidle idle-lock unit with noctalia IPC fallback chain
This commit is contained in:
1 parent
779b65af8c
commit
9a5387b6c0
1 file changed
+18
@@ -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
|
||||||
Reference in new issue
Block a user