samg / timetrap

Simple command line timetracker
http://rubygems.org/gems/timetrap
Other
1.48k stars 115 forks source link

Feature request: Auto checkout on system sleep #121

Closed fredcallaway closed 8 years ago

fredcallaway commented 8 years ago

I'm completely naive to low level system behavior, so forgive my ignorance if this is impossible...

Would it be possible to configure time trap to automatically checkout of all running activities upon system sleep? This saves the trouble of explicitly checking out before leaving your computer, and the hassle of fixing it when you forget.

Many thanks!

samg commented 8 years ago

This probably isn't something that could be provided by timetrap itself, though it looks like there are tools that allow you to run a command on system sleep. This Stack Exchange post could be a good place to start.

If you can get one of those set up you might be able to run t out when your computer suspends and get the behavior you want.

fredcallaway commented 8 years ago

Thanks for the pointer!

I was able to accomplish this with sleepwatcher.