The shell script has two variables at the top, the location of your block list and the location of your hosts (as in /etc/hosts) file. Anyone with a modicum of unix knowledge should get how it works now (if not, don't use it). As an additional step I export my Tomboy todo list to HTML and use netcat to serve it up on localhost (trying to use a combination of dbus and the ExportToHTML xsl to automate this, but not succeeding). This ensures that I am not only prevented from being side tracked, but am put back on track.
The block list is formed by listing the base domain for each site, one per line. For example:
singe@blackguard:~$ cat ~/.worktime
facebook.com
bloglines.com
twitter.com
singe.za.net
engadget.com
gizmodo.com
boingboing.net
You'll need to run it as root to modify the hosts file. For example:
singe@blackguard:~/bin$ ./worktime.sh
Invalid argument!
The options are "on" or "off" e.g.:
./worktime.sh on #to enable work time
./worktime.sh off #to enable play time
singe@blackguard:~/bin$ sudo ./worktime.sh on
Get to work!
singe@blackguard:~/bin$ sudo ./worktime.sh on
It's already work time.
singe@blackguard:~/bin$ sudo ./worktime.sh off
Work's done, let's play.
singe@blackguard:~/bin$ sudo ./worktime.sh off
You're already playing.
You can download it here.
Tracked: Jan 23, 07:12