Skip to main content
Topic: How can I run my lockscreen script on suspend/hibernate (Read 1868 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How can I run my lockscreen script on suspend/hibernate

I'm on runit and  using loginctl for everything. My lockscreen script shuts down media and runs i3lock and it works, but I cant get it to lock and suspend. I tried putting the script in /usr/lib/elogind/system-sleep/ and it took noticeably longer to suspend, but it didn't lock, I don't know if it had anything to do with the "sleep 5" in my script or not. Wondering if theres a good way to go about this, thanks.

Edit: I would love if it worked along with loginctl so I didn't have to edit anything else, anything that wants to suspend will lock too. I don't know if the systax is wrong or something

Re: How can I run my lockscreen script on suspend/hibernate

Reply #1
I'm very interested on this feature. I'm thinking to use elogind system-sleep hooks for that, but the way I wrote just doesn't works with slock.
It's me. The only me.