I'm using fedora 28. I have a series of programs that I'm launching based off lock and unlock times, but I wanted these programs to adjust their behavior if sleep is detected.

So I want to create flag files (empty files whose existence dictates action) whenever my laptop goes to sleep, but I'm unsure of how to actually detect sleep. If I was more comfortable with D-Bus I would just monitor for it, but I still don't get how it actually works.

what is an effective way to monitor for suspend or wake from sleep actions?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.