From a371ab94069f827c811eb9e486a5feab923789d7 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 18:19:46 +0100 Subject: [PATCH] home: wm: i3: fix 'toggle-xautolock' Because of DPMS, I would still get a screen-lock after a 10-minute timeout. I think the `xset s {on,off}` part is not _strictly_ necessary, but a little bit of cargo-culting never hurt anybody. According to the `xss-lock` man page `xset s on` use hard-coded values, not my preferred timeouts. Given that I rely on `xautolock` anyway, I don't care about the timeouts and set them to `0`. --- modules/home/wm/i3/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/home/wm/i3/default.nix b/modules/home/wm/i3/default.nix index 4e5b03f..9826e68 100644 --- a/modules/home/wm/i3/default.nix +++ b/modules/home/wm/i3/default.nix @@ -47,10 +47,14 @@ let if ${systemctlUser} is-active xautolock-session.service; then ${systemctlUser} stop --user xautolock-session.service xset s off + xset s 0 0 + xset -dpms ${notify} "Disabled Xautolock" else ${systemctlUser} start xautolock-session.service xset s on + xset s 0 0 + xset +dpms ${notify} "Enabled Xautolock" fi '';