How can I lock my screen with i3lock when I close my laptop lid?
Checking the net I mostly find solution with systemd or a login manager that I don’t use (startx)
is the HandleLidSwitch working for you ?
Try using acpid ?
Take a look at: /etc/acpi/handler.sh
Yes had a look there but it didn’t work for me … I guess this is run as root and how is handler.sh supposed to know about my X session?
Or maybe I’m stupid and didn’t try hard enough :p!
Yes I’m a retarded, it works ! Sorry for all the noise!
What did you find out please?
edit the /etc/acpi/handler.sh and add i3lock command in the lid close section
Thanks for clarifying. Always useful for people trying to achieve similar in the future.
@Erin in this topic there’s another example of the use of handler.sh