Every now and then, I need a change of scenery, and that includes what I see on my computer desktop. I spent this afternoon giving my desktop a long-overdue makeover. And thanks to the fact that my to-do list is based on text files, and that I use text files for many other things, it was fairly easy to include some real-time analytics embedded into my desktop via GeekTool. Here is what my new desktop looks like. Click on the image to see a larger version.
I have a 27″ iMac so my screen is pretty big. I use multiple “desktops” but all of them have the same basic look as above. I found a cool typing paper background and an old typewriter font to give it some flavor. You’ll note I’ve made 3 annotations on the image. I’ll discuss each of these below.
1. My to-do list rundown
I use todo.txt to manage my to-do list, and there is a little add on that takes your to-do list and produces a rundown. basically, it shows you what you completed yesterday (or the last day on which you completed a task) and what is still on your list. I embedded this into my desktop using GeekTool, and it updates automatically as my to-do list changes. This means that I never have to look further than my desktop to see what is on my to-do list.
GeekTool allows you to run shell commands and render the results as widgets that are embedded into your desktop. I used three different simple shell scripts to produce the date/time/weather section of my desktop:
For the date:
date +"%A, %b. %d"
For the time:
and for the weather:
curl --silent "http://weather.yahooapis.com/forecastrss?p=yourzipcode&u=f" | grep -E '(Current Conditions:|F<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/\(.*\) F/\1° F/' -e 's/<\/>//'
I got the latter from a repository of GeekTool scripts. It basically parses Yahoo’s weather for your zip code and produces a simple result.
Books read this year
I’ve explained how my main reading list is a plain text file that I keep in Dropbox. Because it is plain text, it can be easily manipulated. I can parse it to produce my formatted reading list page. And I can also use simple UNIX commands to extract additional information. To produce the number of books that I’ve read so far in the current year is as simple as running the following command:
grep `date '+%Y'` ~/Dropbox/Public/reading.txt | wc -l
For those who don’t speak UNIX, all this command does is searches for anything in my reading.txt file that contains the current year. It then filters the results through the “wc” command, which is the word count command. The -l says to count the number of lines int he results. Since I have one book per line, whatever that number of resulting lines is represents the number of books I’ve read so far this year.
What I’m currently reading
I wrote yesterday of how I keep a now.txt file that contains the title, author and Amazon product code of the book I’m currently reading. To produce this information on my desktop, I run a command that parses the contents of that file:
cat /Users/jamietr/Dropbox/Public/now.txt | sed 's/(.*)\(.*\)/\1/'