Take a break hack

I think a lot of people take too few breaks when sitting in front a computer. I know at least that I do. The main problem with not taking breaks is that one can get injured (I have at least neck pains if I sit too long without taking any breaks).

I have tried to solve this problem in a fun and inspirational way :)

How it works?

  • Every hour you'll get a notification to take a little break
  • With the notification you'll also get a quote, to spark some creative thinking (the quotes are from Peter Norvig's quote collection)
  • My hack only works on Mac OS X

A screenshot of how a notification looks like this:

Take a break screenshot

Get it installed in 5 minutes

  • Install Growl - it's a notification application for Mac OS X
  • Download take_a_break.zip
  • Extract take_a_break to your home directory

Now that it's installed be sure you can run it, open Terminal.app and type in:

  • python ~/take_a_break/take_a_break.py

This should show a notification like the one in the screenshot!

The last touch is to run this every hour, to do so here's what you do:

  • open Terminal.app and type EDITOR=vim crontab -e (replace vim with the editor you are familiar with)
  • this will open a file where you can alter cron jobs

In this file, add following:

0 * * * *   python ~/take_a_break/take_a_break.py

Save the file. This will run take_a_break every hour. To add a cron job you can also use Crontooie [a front-end GUI].

Ok, that's it. Hope you find this tip useful and remember to take breaks :-)

Announcements · Code · Life · Python · Tips 26. Jan 2009
© Amir Salihefendic. Powered by Skeletonz.