[Unit] Description=swayidle idle lock (locks via noctalia-shell IPC, suspends on lid) Documentation=https://github.com/swaywm/swayidle After=graphical-session.target [Service] # Locks via the noctalia v5 shell; `noctalia msg` resolves the running instance # through the D-Bus session bus, so no WAYLAND_DISPLAY pinning is needed in unit context. # 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 '/usr/bin/noctalia msg session lock' \ before-sleep '/usr/bin/noctalia msg session lock' \ after-resume '/usr/bin/noctalia msg session lock' Restart=on-failure RestartSec=5s [Install] WantedBy=default.target