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`.
This commit is contained in:
Bruno BELANYI 2026-04-04 18:19:46 +01:00
parent 452a1e9645
commit a371ab9406

View file

@ -47,10 +47,14 @@ let
if ${systemctlUser} is-active xautolock-session.service; then if ${systemctlUser} is-active xautolock-session.service; then
${systemctlUser} stop --user xautolock-session.service ${systemctlUser} stop --user xautolock-session.service
xset s off xset s off
xset s 0 0
xset -dpms
${notify} "Disabled Xautolock" ${notify} "Disabled Xautolock"
else else
${systemctlUser} start xautolock-session.service ${systemctlUser} start xautolock-session.service
xset s on xset s on
xset s 0 0
xset +dpms
${notify} "Enabled Xautolock" ${notify} "Enabled Xautolock"
fi fi
''; '';