Customize Your Desktop with GeekTool
Posted 05/18/2009 at 9:53am
| by David W. Martin
Let's face it the Finder desktop that ships on Macs just isn't all
that exciting and there is a lot of wasted real estate on a Mac
desktop. So what can you do with all that space? Fortunately you can do
a lot and this how-to will show you how.
After you've added all the information you can handle to your desktop, why stop there? By replacing your icons, changing your fonts
and desktop background, you can take your desktop from zero to hero.
Difficulty level:
Medium
What you need:
> OS X 10.4 or later
> GeekTool 2.1.2
> A spectacular desktop image
> 30 minutes to spare
Optional Items:
> Yahoo Widget Application
> widescapeWeather
> Magifique
> RSS Feed Script
Optional Icon Packs:
> iCal
> Folders
> Hard Drives
GeekTool 101 
Empty GeekTool
After installing GeekToolt,
launch System Preferences and locate GeekTool under the Other category
clicking it once with the mouse to activate it. You'll see a screen
similar to the one above. Groups should be empty.
Before we configure GeekTool for your own custom desktop, we need to take a look at File, Shell (Command) and Picture
from the drop down near the top of the GeekTool window since these are
the three ways it will display information on your desktop.
File
- Choose one or more files that you want to have shown in real time on your
screen. You can even choose where you wish to position them on your
screen. If the file contents change so should what you see on your desktop. Logs are great files for the File entry.
Shell (Command) - you can specify Unix (or shell)
commands, and the output will be available anywhere, and in order for
it to update you will also have to input a refresh time.
Pictures
- Grab any picture on the internet via its URL and assign a frame
type, transparency and so on to display the picture on your desktop in
real time with an optional refresh setting. Great for web cams.
Creating an Entry

Click the New Entry button. Boom, you're making magic. Desktop magic.
Creating an entry, no matter what type, is a straight forward affair. Click the New Entry button (Duh), select if the Entry will be a Picture, File or Shell, and input the Shell command, or navigate to the desired file. Picture and File are straight forward. Shell on the other hand, involves actually knowing the shell commands. Lucky for you, we have a list of commands below.
Now that you have your Entry in GeekTool, let's get it where it needs to be on the desktop and adjust its appearance.
Displaying Your Entries on the Desktop
GeekTool allows a certain degree of display customization for entries.
It's because of this customization that GeekTool has been embraced by
users. The font, color, alignment and drop shadow are adjustable under
the File and Shell entries.
In addition, under the Picture setting you can add frame to that photo of NKOTB.

Adjust the areas in which your entry rests on the desktop via mouse or adjusting the X and Y coordinates.
All elements added in GeekTool are arranged spatially via the X and Y axis of your display. This coordinates can be entered manually, or you can click on an entry in GeekTool and the item on the desktop will have a bluish box you can re-size and move.
Any
of the Entries can be set to display as "Always on top" so that it appears above app and finder windows.
Shell Commands
Here
are some suggested Shell commands that you might try to use on your own
customized Mac desktop. Experiment with each one or add your own! We highly recommend cutting and pasting the following
Shell examples into GeekTool to prevent typos. Be careful not to
introduce any carriage returns or extra lines. All these Shell commands
should paste as single lines. If they do not then you need to try
re-pasting it or entering it manually.
Top Processes Display
top -ocpu -FR -l2 -n20 | grep '^....[1234567890] ' | grep -v ' 0.0% ..:' | cut -c 1-24,33-42,64-77
Setup Time Display
date "+%l:%m %p"
Setup Date Number display
date +%d
Setup Month Display
date +%B
Setup Weekday Display
date +%A
Setup Calendar Display
cal
Setup Uptime Display
uptime | awk '{print "" $3 " " $4 " " $5 }' | sed -e 's/.$//g';
Setup RAM Display
top -l 1 | awk '/PhysMem/ {print "" $8 " "}' ;
Setup CPU Display
top -l 2 | awk '/CPU usage/ && NR > 5 {print $12, $13}'
Setup RSS News Feeds Display
This one is a bit harder and requires some knowledge of Unix Shell
Scripting - contact your local guru for assistance if you get stuck.
1. You'll probably want to change the default RSS feed in the news.sh file you can download here. Right now it's set for Yahoo Hot News from Canada. Find a feed you want and copy the link, DO NOT CLICK ON THE LINK. It will take you to the feed. That URL will not work. You want your feed to begin with http:// for the shell script.
Good: http://images.apple.com/main/rss/hotnews/hotnews.rss
Bad: feed://images.apple.com/main/rss/hotnews/hotnews.rss
Replace
URL="http://ca.rss.news.yahoo.com/rss/topstories"
With
URL="http://images.apple.com/main/rss/hotnews/hotnews.rss"
Unless of course you're down with Yahoo Canada's Hot News.
2. Now place the downloaded copy
of news.sh that you downloaded from Google in a location of your choice
(i.e. your Documents folder). Make a note of the complete file path to
news.sh.
3. Click New Entry in GeekTool and change its name to "News RSS"
4. Using the drop down directly to the right of Groups select Shell
5. Enter the following for the Command:
sh [location/]news.sh -[number]
[location] is the path that you were told to document in Step 1
[number] is the number of entries you want to appear for this use 4
Example: sh /Users/loaner/Documents/news.sh -10
6. Make sure that "Always on top" is not checked
7. Using the mouse or keyboard position your RSS Feed where you want it on your screen
File Commands
Setup To Do List
You can use files to display text files statically on the screen as read only. One example is to create a To Do list.
1.
Create a text file with TextEdit and call it Todolist save it in your
documents folder or other location of your choice (not the desktop).
2. Enter some items even just examples of things to do in the file.
3. Click Format>Make Plain Text and save the file with the example To Do list.
4. Go back to GeekTool preferences pane.
5. Click New Entry and change its name to "To Do List"
6. Using the drop down directly to the right of Groups select File
7. Using Choose... select the file you created to set the file path in GeekTool.
8. Make sure that "Always on top" is not checked
9. Using the mouse or keyboard position your To Do List where you want it on your screen
Setup Various Object Labels Using Files
One
use of files is to display labels for the items you place around the
screen. We'll use some of the labels below to label the Shell examples
above.
1. Create a text file with TextEdit and call it
uptimetext.txt save it in your documents folder or other location of
your choice (not the desktop).
2. Enter the text UPTIME in the file.
3. Click Format>Make Plain Text and save the file
4. Go back to GeekTool preferences pane.
5. Click New Entry and change its name to "Uptime Text"
6. Using the drop down directly to the right of Groups select File
7. Using Choose... select the file you created to set the file path in GeekTool.
8. Make sure that Always on top is not checked
9. Using the mouse or keyboard arrange these to label the appropriate objects on your screen displayed by GeekTool
Repeat these steps above for the following:
| Filename | Text
| New Entry Name
|
| ramtext.txt | RAM
| RAM Text |
cputext.txt
| CPU
| CPU Text |
| topproc.txt | Top Processes | TopProcessText |

Picture Commands
These
can be used to display static pictures from the internet, but when used
to display an updating web cam they will update as the camera updates
the feed. Pretty neat. Try your own web cam like this one at
ThinkGeek.com:
http://www.thinkgeek.com/images/cams/codemonkeys.jpg
Conclusion
The
end result of my customization is shown below. Although I did not
change everything the new desktop does suit my current needs. The level
of customization is amazing and we would like to see what you come up
with so please post a link to a photo of your personalized desktop in
the comments.

Click to Embiggen