How to GeekTool your Mac to Awesomeness

by Milind Alvares on May 22, 2009

Post image for How to GeekTool your Mac to Awesomeness

geektoolEver since we started the Flickr Desktop Pool, I’ve marvelled at the cool desktops which generally involve some tooling around with GeekTool. It’s something that brings in such a lot of dynamics to your desktop while keeping a low overhead, and allowing you to customise it to the last pixel.

Here’s a little screencast I’ve put together, to get you started on GeekTool. It’s a really simple tool, which just takes a little time and understanding to get used to.

First, watch this little video screencast (download link at bottom or subscribe to podcast) on how to setup GeekTool, and then proceed on to find some interesting GeekTool scripts you can use. You can start with some scripts I’ve collected below. It’s by no means exhaustive.

Time:

"date +"%I:%M %p" (which results in 11:30 pm)

If you want a 24 hour clock (e.g. 03:00 a.m.) then replace %I with %H. If you want to add seconds there, add %S to the mix. Remember to change the refresh rate to every 1 second if you’re adding seconds.

Date:

"date +"%A %d %b" (which results in Monday 12 June)

World Clock:

TZ=NewZealand/GMT-13 date +"Wellington:%l:%M %p on %d %B"

Just change the names and GMT value to get the required clock.

Uptime:

uptime | awk '{sub(":", "h ", $3); sub(",", "min", $3); print "Time since last system boot: " $3}'

(results in 14h 23min)

RSS feed
Download the news.sh file from here, copy it to your home folder (or wherever). Then open it in a plaintext editor and change the RSS feed to whatever you choose. Then in the terminal, enter “sudo chmod u+x ~myhomefolder/news.sh”. Once that is done, add “sh ~myhomefolder/news.sh -4” to your shell script. As demoed in the screencast.

Using GeekTool to add an xkcd comic on your desktop.

S.M.A.R.T status alongside your hard drives (via Bioneutral)

diskutil info disk0s2 | grep Verified > /dev/null

Replace ‘disk0s2’ with the disk ID of choice. You can find the disk ID in system profiler. Once you’ve added that, go to the last tab “Icon”. Select “Show icon” and click on default. That will place a little green blip whenever that disk is fine. You can then place the green blip next to your hard drives on the desktop, to tell you that everything is A OK. Doesn’t work on external drives though.

Add a title

If all you need to do is add a title or bit of text on your desktop, simply type in 

echo "my title"

Adding a semicolon (;) at the end will break the line. 

Memory Hoggers

top -orsize -FR -l1 | grep % | grep -v Load | grep -v COMMAND | cut -c 7-8,64-69

Change the number 8 to the number of processes you want displayed.

CPU Usage:

CPU -
echo CPU usage
top -l 1| awk '/CPU usage/ {print $8, $9}'
top -l 1| awk '/CPU usage/ {print $10, $11}'
top -l 1| awk '/CPU usage/ {print $12, $13}'

Memory Usage:

top -l 1 | awk '/PhysMem/ {print "Used: " $8 " Free: " $10}'

Adding iTunes data on your desktop is best done with Bowtie. There’s loads of themes for that, so you don’t have to do any of the work.

If you’ve got some cools scripts up your sleeve, do share them in the comments.

[Flickr desktop pictured above by A. Till]


Reader Comments

15 GeekTool desktop inspirations for the weekend | Smoking Apples
May 22, 2009 at 9:09 pm
Flickr Desktop: First attempt at GeekTool | Smoking Apples
May 26, 2009 at 3:38 pm
10 Beautiful Bowtie Themes | Smoking Apples
June 20, 2009 at 12:46 am
Control Option Command » GeekTool Desktop
July 13, 2009 at 1:48 am
geek « Ctrl Al Del
December 20, 2009 at 3:39 am
Anpassen wie ‘nen Schreibtisch …
February 6, 2010 at 5:19 pm
GeekTool | Hogargeek
February 7, 2010 at 11:01 pm

Reader Comments

Jon May 22, 2009 at 4:55 am ammonialime

SA is the new, old TUAW, keep up the good work.

   

Marcus Ting May 22, 2009 at 1:12 pm twitter.com/marcusting

Awesome article, using it now. would’ve never considered it if it weren’t for this article. keep up the good work

   

Pepa May 22, 2009 at 2:15 pm josefrichter.com

Great tutorial! Just the link to GeekTool seems to be missing :-) http://projects.tynsoe.org/en/geektool/

   

David Martorana May 22, 2009 at 9:49 pm multiplexapp.com

Wicked cool Milind!

   

Pustoolio May 23, 2009 at 5:19 am dropcomics.com

Thanks for this! One note, the rss feed from this site displays funny characters.

   

sosh May 23, 2009 at 1:12 pm

Thank you very much

   

sosh May 23, 2009 at 7:32 pm

How can I add weather gadgit ?

Thanks once again

   

Ben May 23, 2009 at 8:27 pm suberapps.com

Really useful tutorial. Was looking for the link to download Geek Tools all over this article but couldn’t find it though. Thanks Pepa for providing the link.

   

Yash May 25, 2009 at 12:30 am yashrg.co.in

If I’m adding normal text. Can I set refresh to 0 to tell it to NEVER refresh?

   

Tally May 25, 2009 at 3:56 am

The fonts displayed by GeekTool are not antialiased like the rest of Macintosh fonts for me, which makes them very ugly. Is there a way around this?

   

Tango May 25, 2009 at 12:43 pm

Any chance of a tutorial for monitoring DL speed? Thx!

   

PC July 20, 2009 at 5:44 am

Thanks for this great tutorial.

with shell “cal” i posted the calender on my desktop. How should i change the shell to begin the calender with monday, not with sunday?

   

jeff February 7, 2010 at 5:58 am

Thanks for the tutorial. My time is stuck on the initial time when i entered the shell command. It is not updating, seems to be stuck. i have the refresh rate set to 10s. any idea what is going wrong??

   

Leave a Comment

Previous post:

Next post: