You could write a service to trigger the lock when the lid closes, the way i like to do it is with xss-lock from the aur that lays in the background and responds to system calls.
Use acpid, it can execute scripts on acpi events like lid close, lid open, adapter plugged or adapter unplugged etc.
Once you have it installed, enable it with systemd and start it. For setting up events, the arch wiki has a pretty good guide (haven't looked at others but there's probably loads).
3 comments
You could write a service to trigger the lock when the lid closes, the way i like to do it is with xss-lock from the aur that lays in the background and responds to system calls.
Use acpid, it can execute scripts on acpi events like lid close, lid open, adapter plugged or adapter unplugged etc.
Once you have it installed, enable it with systemd and start it. For setting up events, the arch wiki has a pretty good guide (haven't looked at others but there's probably loads).
https://s.natalian.org/2017-01-18/slock.service is what I use