I have some troubles with using slock with void linux.
I tried adding slock as a script to zzz: /etc/zzz.d/suspend/slock
#!/bin/sh
slock
which works in a strange way: if I call zzz
, it brings up slock and doesn't suspend until I enter my password and unlock. I moved the script to /etc/zzz.d/resume/slock
, now on resume it flashes unlocked screen for a second and then locks the screen, which is not so good but fine.
But there is another problem: closing the lid suspends the laptop but it doesn't lock the screen at all.
I thought it might have something to do with acpid
. When I disable acpid
, closing lid doesn't suspend the laptop, so acpid
is definitely responsible for this. I tried to tinker with /etc/acpi/handler.sh
, now it looks like this:
close)
# suspend-to-ram
logger "LID closed, suspending..."
slock
zzz
;;
open) logger "LID opened" ;;
*) logger "ACPI action undefined (LID): $2";;
and slock
is not executed anyways. I tried removing zzz
from handler.sh
, then closing the lid doesn't do anything, which means it actually executes zzz
when it's present but doesn't execute zzz
's user scripts for some reason. I also tried replacing slock
with i3lock
in both handler.sh
(like void wiki suggests) and zzz.d/resume
but it's the same. Did I do something wrong or is there another reason for this behavior?