Recently I've been running a terminal based Java programme, but the programme is often quite laggy while I am playing computer games. During these periods I turn the programme off but then I forget to turn it back on... 1st world problems eh?
So I wrote this script
The script itself is fine. The problems I am mainly having is with the triggers. Currently I am using these triggers.
The problem is that neither of these are particularly efficient... Some days I am up beyond 3:30am, for instance... And waiting for my system to sleep takes time and I guess I just wanted to get it more efficient.... So I've been wondering how I could detect me being idle... One idea was to get the mouse position and detect whether it has moved since 2-3 minutes ago. If it hasn't then I must be idle... But sometimes I play games where the mouse position doesn't really move I don't think... So I'd also need to take into account keyboard inputs and blargh...
So other than detecting when the system sleeps is there a better way to do what I want to do?
Thanks!
~Sancarn