ChristianLightServices/TimeLight

feature: stop the timer when computer goes to sleep

cip123 opened this issue · 1 comments

As the title says, it would be nice if this plugin could detect when the computer is going to sleep and stop the timer.

Users can then stop the timer just by locking their computers.

Hmm, I like the idea, but I think that some people (like myself) are going to want the timer to keep running when the computer is locked. This would have to become a configurable option before I would accept it.

Also, this might be easy to do on Windows or macOS, since there would just be a single API to use, but it might end up being a nightmare trying to support all of the different screen locking options for Linux, since I was not able to find a D-Bus API for this right off the bat. In your case, since you said you are using GNOME, you might be best off to use https://github.com/lucassabreu/clockify-cli in a script that you hook up to run whenever the screen is locked. I don't know how you would end up doing that though.