From 9a6031f44c7d6ac368a68da61d397fa118fe0faa Mon Sep 17 00:00:00 2001 From: Bas Grolleman Date: Wed, 3 Jun 2026 07:39:55 +0200 Subject: [PATCH] Add auto lock/sleep to niri --- niri/cfg/autostart.kdl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/niri/cfg/autostart.kdl b/niri/cfg/autostart.kdl index f6f0187..1ca567c 100644 --- a/niri/cfg/autostart.kdl +++ b/niri/cfg/autostart.kdl @@ -2,3 +2,9 @@ // https://github.com/YaLTeR/niri/wiki/Configuration:-Miscellaneous#spawn-sh-at-startup spawn-sh-at-startup "qs -c noctalia-shell" + + // Lock screen after 5 min, turn off monitors after 15 min + spawn-at-startup "swayidle" "-w" + "timeout" "300" "qs -c noctalia-shell ipc call lockScreen lock" + "timeout" "900" "niri msg action power-off-monitors" + "resume" "niri msg action power-on-monitors"