My Desktop

January 22nd

Desktop

I recently real­ised that I haven’t gone into any detail about my work envir­on­ment. For today, I thought I’d start with my desktop. First things first, the wall­pa­per is from a pic­ture pos­ted up on Twit­ter recently by Bryan Lee O’Malley — the author of the won­der­ful Scott Pil­grim series, soon to be a movie by the tal­en­ted Edgar Wright (dir­ector of Spaced / Shaun Of The Dead).

But recently I’ve been get­ting com­ments about the “crazy text in the top left corner” of any screen-shots I show people, so I thought I’d post up a bit of a tutorial for the applic­a­tion that makes this all pos­sible — Geek­Tool. What it does is run scripts and com­mands that you would use in Ter­minal and dis­play the out­put on your desktop.

Geek­Tool is quite simple to use. For now we will just be mess­ing with ‘Image’ Geeklets, just drag one into pos­i­tion on your desktop and you will see the ‘Prop­er­ties’ win­dow. There are three import­ant things here: Com­mand, Refresh, and Style. Com­mand is where you will enter the scripts below, Refresh is how often you want the out­put to refresh (I find 10s works well for most cases), and the but­ton below Style — ‘Click here to set font & color.’ — opens up the default Font style win­dow of OS X (which you should already be accus­tomed to).

The vari­ous scripts I’ve gathered together below have been col­lec­ted from tutori­als all over the web, I hope you find them as use­ful as I did.

Date
We’ll start from the left and move our way across to the right. First up we have the date, to dis­play this we use date +%d. Sim­il­arly, the month and day are gen­er­ated using date +%b | tr ‘[a-z]’ ‘[A-Z]’ and date +%a | tr ‘[a-z]’ ‘[A-Z]’ respectively.

Dividers
The dividers are very simple, just echo '|'.

Time
The time is achieved in much the same was as the date was: date +%R. If you’re not com­fort­able with 24 hour time then you will want to use date +%I:%M.

Weather
The weather was a tricky one. I went through vari­ous scripts using both Lynx and cURL, Yahoo Weather and Weather Under­ground. The one that I found that worked best was:

curl --silent "http://xml.weather.yahoo.com/forecastrss?p=YOURCITYID&u=c" | grep -E '(Current Conditions:|[A-Z]<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/[A-Z a-z]*, //' -e 's/\(.*\) F/\1 °F/' -e 's/\(.*\) C/\1 °C/' | sed 's/ //' | tail -n1

The prob­lem with using Yahoo Weather is that it’s recently been changed to use a dif­fer­ent set of para­met­ers, and although both new and old will work for Amer­ican cit­ies the same does not seem to be true for the rest of the world. Luck­ily AOL uses the same nam­ing con­ven­tions. So if you visit AOL Weather, and find your city, you can get the ID from the end of the URL. In my case it was ‘UKXX0045’. You will then need to use that to replace YOURCITYID in the code above.

Music
This is the bar with the Kanji (because I was listen­ing to Yura Yura Teikoku at the time) that is under­neath the rest of the inform­a­tion. This doesn’t use Geek­Tool at all, but rather Bowtie. Bowtie is sup­posed to sync with your Last.fm page, flash Growl noti­fic­a­tions on new songs, allow cus­tom key com­bin­a­tions to con­trol music, and look pretty on your desktop (using an HTML and JavaS­cript them­ing sys­tem). In truth it does all of these things quite poorly, and I’ve often found it will simply stop syncing with no warn­ing, but it is still only in Beta.

Hope­fully you found these scripts of some use. If you’re look­ing for more then I would recom­mend you Google “geek­tool scripts”, or visit this over 70 page thread on MacRumors.


Leave a Reply

Details

'My Desktop' was posted on January 22nd, 2010 in the Category: Tutorials.

You can subscribe to the comments on this post, or post a comment of your own



Related Posts

About Us

SuperpositionKitty is Ryan Smith & Jennifer Smith. Based in Australia, but operating out of the United Kingdom, they have been working together since roughly the turn of the century. Read More…

Get In Touch

You can get in touch with Ryan at ryan@superpositionkitty.com, or Jen at jen@superpositionkitty.com. If you have any questions, feedback, or suggestions for the website, then you can contact us at collective.

CompleteTrimmedSecond FrameAll SidesGluedGluing

Currently Saying

Jen:  Ryan: