Can I automatically "preload" light-locker (or any screen locker) upon suspend?
from monovergent@lemmy.ml to linux@lemmy.ml on 16 Aug 15:04
https://lemmy.ml/post/34771128

When using XFCE in conjunction with light-locker (the default lock screen utility), it normally takes some seconds to resume from suspend as it loads up the light-locker prompt. However, I’ve found that if I let the prompt load up, but then close the lid without entering the password and let it enter suspend again, light-locker is almost instantly ready the next time I resume. Is there any way to do this automate this behavior when I close the lid of my laptop?

#linux

threaded - newest

Ephera@lemmy.ml on 17 Aug 03:04 collapse

Hmm, you should be able to set a custom command for it to run before suspend like this: unix.stackexchange.com/a/526290

And apparently, you can tell light-locker to lock immediately with light-locker-command --lock: …debian.org/…/light-locker-command.1.en.html

I guess, you might want to try out, if it works at all, before you start editing files. If it works with this, then I’d expect it work when you put it in into the file, too:

light-locker-command --lock && systemctl suspend