Script to remind you to take a break

You shouldn't spend 8 solid hours at the keyboard. We all know this. Every 20-30min you should take a short streatch break. Of course when I'm coding I get in the zone and before I know it, I've been at the keyboard for 16 straight hours. So I had to make a little reminder.

There might be better ways of doing this, but I decided to use Tcl/Tk and wish (http://www.tcl.tk/).

So first create something for wish to run (for the record it took me hours of googling and testing to figure this out):

Now all you have to do is schedule it in your chrontab to run every X minutes Pprobably want to limit it to running during work hours. Otherwise you'd end up with a bazillion of these windows on Monday morning.

Note the DISPLAY=:0.0. This tells it to pop up on your screen and not wherever cron might want (or rather not pop it up at all). Highly recommend checking out http://wiki.tcl.tk/1382 if you're having issues with wish and cron playing nicely together.


Last modified: Wed May 30 11:01:27 EDT 2012