It may be covered with applications and windows most of the time, but your Mac's desktop can also be an excellent source of information, including the time and date, available hard drive space, battery status, system performance, and more. With GeekTool, you can put all of that information right on your desktop. Here's how you can make your desktop more useful but keep it looking sharp.
It's been a while since we looked at desktop customization app GeekTool. GeekTool has come a ways since then, and setting up a gorgeous HUD using GeekTool is easier—and GeekTool itself is more powerful—than ever.
Note: For the Windows side of this coin, see how to create an attractive, customized desktop HUD with Rainmeter.
What Is GeekTool?
GeekTool is a utility that allows you to embed objects and information directly onto your Mac's desktop. It installs as a preference pane in the System Preferences, and from there you can open use any of the three included plug-ins (called "geeklets") to run text commands. The output from those commands is displayed on the desktop, organized and styled by you.
The three bundled geeklets include the "File" plug-in, which allows you to monitor system and application activity or keep a text file open on your desktop, the "shell" plug-in that lets you run scripts of terminal commands and display their output on the desktop, and the "image" plug-in that lets you embed items like iTunes album art, weather conditions, and more on your desktop.
Update: Rocco writes in to point out that GeekTool does support Lion, and is available in the Mac App Store here. When installed from the app store, it'll run as a separate application, not a Preference pane. GeekTool currently supports Mac OS 10.6 Snow Leopard (Lion isn't supported just yet, but should be in time) with previous versions available for older versions of Mac OS X. While GeekTool isn't quite as graphically intensive as its closest Windows counterpart, Rainmeter (which we've already shown you how to configure in Windows,) you can still build a gorgeous HUD on your Mac with it.
Step One: Getting Familiar with GeekTool
Installing GeektTool is simple-just download and open the installer to add it to the System Preferences (it'll appear under Other at the bottom.) When you open the GeekTool preference pane, you'll see the three default geeklets, and options on the right to add GeekTool to the menu bar, enable or disable GeekTool, and to add and delete groups of geeklets.
Groups allow you to configure multiple geeklets without having to tweak them every time you change your wallpaper or plug in an external display. You can set them up to fit a specific need, work with the desktop wallpaper that you have up, or just fit your mood. For example, if you have a dark wallpaper, your date and time geeklets may need white text. Switch to a brightly-colored wallpaper, and you can switch groups to change the font and colors without having to go into each geeklet to change them one at a time. Click the checkbox next to the group name to activate or deactivate that group, or toggle them from the menu bar.
To activate a geeklet, drag it out of the System Preferences window to the desktop where you want it to live. When the plug-in is in place, the properties window will change to allow you to change its size and position, type in the commands you want the plug-in to run, select the image you want it to display, or specify the text you want it to show. Anything you can run in terminal will run in a geeklet, so if you love the command line, here's where you can put those skills to use.
Step Two: Set Up Your Geeklets
The default geeklets are fairly powerful, and can help you get a long way towards the HUD of your dreams. Here are a few ways to get started adding some flare to your desktop using the default geeklets:
Add the Time and Date:
Drag the Shell geeklet to your desktop, and place it in the space where you'd like the time to appear. Drag the bottom right corner to resize it to be as large as you'd like the time to display on your desktop. Give it a name, and then, in the "command" field of the properties window, type the following:
date "+%H:%M"
Set the refresh rate to be every 60 seconds so the time updates every minute. Then click the box to set the font and color, and increase the size so the time is displayed as large as you'd like. It should take up the entire space you've set, but if it's too large, you can either decrease the font size, or resize the geeklet so the entire time is displayed. Set the color to something that's readable on your desktop background, and then change the font to something you like. In the example here, I used Futura Medium, at 144 pt.
I'm using a 24-hour clock here, but if you prefer the AM/PM style, use this string instead:
date "+%I:%M %p"
The %I toggles 12-hour format, and the %p
on the end adds an AM/PM to the clock.
Once the time looks the way you'd like it to, repeat the process for the day of the week. Drag another Shell geeklet to the desktop, adjust its size to match how large you'd like the day to appear relative to the time, and then type the following into the command field:
date "+%A"; date "+%d %B %Y"
That will show the day of the week, insert a line break (the semicolon adds the line break,) and then the date on the next line. Set the refresh timer high this time, maybe every 1000 or 5000 seconds—after all, the date only changes once every 86,400 seconds. If you're up at midnight and it would kill you to see the previous date for 1000 seconds at most, set it lower. Make sure to match the font with the time for a consistent look.
I could have put all of these in the same geeklet, but you'll note I used a smaller font for the date and day of the week than the clock. While you can add line breaks, you can only have one font and size for each geeklet, so if you want different fonts, sizes, or even positioning that requires spacing beyond line breaks, you'll want to add individual geeklets and position them where you want them to show up relative to each other.
Add a Calendar:
Adding a persistent calendar to your desktop is a good opportunity to see how GeekTool responds to strings of commands. Drag another shell geeklet to the desktop, name it Calendar, and then paste the following into the command field:
cal | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed 's/./#/g') /"
This command will display a calendar on your desktop with the current month and year at the top, a row for the days of the week, and lettered days. The current date is noted with a pair of pound symbols (##.) In my example here, I chose to keep the calendar small and out of the way.
Since you can't just click the time in the Mac OS menubar to see a calendar the way you can with the time in Windows systray, keeping this embedded calendar small and in a corner of one of my desktops lets me see the current date when I need it without opening iCal.
Add Uptime and CPU/Memory Status:
To display uptime and system status on your desktop, you'll need to get familiar with the Unix uptime and top commands. For example, you could drag a shall geeklet to your desktop and paste this inside:
uptime | awk '{print "UPTIME : " $3 " " $4 " " $5 " " }'; top -l 1 | awk '/PhysMem/ {print "RAM : " $8 " "}' ; top -l 2 | awk '/CPU usage/; NR; 5 {printf "CPU" $6, $7=":", $8, $9="user ", $10, $11="sys ", $12, $13}'
Which will do the job, but depending on what you're looking for, could give you entirely too much information. I don't mind the data, so I just cropped the geeklet down to show me the essentials, and set the refresh time good and high so I'm not crushing my CPU running uptime and top over and over again within a few seconds.
If you want an overall view of the processes running on your system, including the ones that are eating the most memory, you can add a shell geeklet with this command that shows you everything running, organized by what's most resource-consuming:
top -l1 -u -o cpu –S
This will give you an incredible amount of information (albeit the same data that the previous command shows, just organized differently,) so be ready to set the font size nice and small and tuck it off to one side of your desktop. Make sure to use a monotype font (courier works well here) for this one if you want the data to be arranted in neat little columns. Set the refresh rate to a couple of minutes, maybe 3600 seconds, and you'll get a good real-time view of your system's performance.
Show Battery Capacity/Charge Remaining
You'll need another shell geeklet for this one. Drag one to your desktop, name it, and then paste this into the command field:
system_profiler SPPowerDataType | grep mAh
This string will call the battery information from System Profiler and display your charge remaining and your battery's full charge capacity so you see how much you've used.
Add a Photo Slideshow
This one's fun: drag an image geeklet to your desktop this time, and name it "Slideshow." Resize it so it takes up the amount of space you want to give it on your desktop. Click ther "Set Local Path" button under the URL field and browse to the folder on your Mac that has contains the photos you want in the slideshow. Select the folder, and then set the refresh rate to the number of seconds you want the image to display before it changes to the next one in the folder. Once these options are set, the image will change automatically at the interval you set.
The slideshow will be behind all of your apps unless you check the "Keep on Top" button in the properties window. If you'd prefer that it rest on top, you may also want to change the opacity slider at the bottom of the window to the level of transparency you'd like for the images. If you leave it turned all the way up, the images will block anything behind them, hovering on top of any other applications you have open.
Step Three: Try New Geeklets and Scripts
Even though there are only three geeklets available when you install GeekTool, Mac OS X Tips has a repository of user-submitted and custom-built geeklets that you can download and play with. Some users in the forum even submit their own desktops, along with instructions on how to recreate it and the geeklets and code required to get the same look.
Once you've downloaded a new geeklet, just double-click it to open GeekTool and run it. It'll place itself on your desktop and open the properties window so you can tweak the script, change the font or color, or reposition it. Before it opens though, GeekTool gives you the opportunity to inspect the script to make sure it's something you want to run.
The wealth of user-created geeklets is worth diving into once you feel you've mastered the basics. You can find geeklets that do everything from display the current song playing in Spotify to show you the title and summary of any unread messages in Gmail. Here are a few others:
- Satellite Weather Map - Add your city to track weather in your region, including storms and hurricanes
- Dateline Calendar - A horizontal 12-month calendar that stretches across the screen
- List of Tasks from Things.app - For users of the productivity app Things, this Geeklet lists current tasks.
- CPU/Disk/Memory Usage Meter - Progress bars for CPU utilization, RAM utilization, and disk space on the primary drive.
- iTunes Song Meter - Displays the progress of the currently playing song in iTunes as a progress bar
Don't underestimate the power of the three built-in geeklets though. With time, experimentation, and a little knowledge of Unix commands, you can do some impressive things with GeekTool. You can find additional scripts and commands over at Keynote 2 Keynote and Cattail.nu, which both host a number of commands that, while old, still work perfectly.
For some inspiration or designs to try with GeekTool, (often in combination with a custom desktop that you can fit your geeklets into,) check out Francesco Mugnai's GeekTool script roundup, Lifehacker alumn Rachel Atwood's gallery at Unplggd, and of course, in the Lifehacker Desktop Show and Tell Flickr pool.
One note of warning: whatever geeklets and scripts you run, make sure to closely watch and appropriately set the refresh timer on your shell geeklets. If you set the refresh rate too low, you run the risk of letting GeekTool consume more system resources than you probably need to allow it. For things that only update every day or not at all, set the refresh rate appropriately high.
Don't Stop Here
If you want to take redesigning your desktop to the next level, consider utilities like Panic Software's Stattoo, which embeds weather conditions, current iTunes track, an icon for battery status, upcoming iCal appointments, and more right on the desktop in a way that GeekTool won't without a lot of script-writing. If you've watched any of our Mac shortcut of the day videos, you've seen Stattoo at the bottom of my desktop just above the dock.
If it's the menubar you want to change, try Nocturne, a free and open source utility that lets you play with the transparency and color of the menubar. If you want to spice up the Dock, there are plenty of utilities to help you with that as well. Check out this list of replacement Dock themes at Beautiful Pixels to get started.
Like most desktop customization tools, the possibilities for GeekTool are simple or broad depending on how willing you are to put time and energy into it. The commands and geeklets we've added here barely scratch the surface of what's possible.
GeekTool can have a steep learning curve when it comes to customizing your desktop, but remember, it was designed primarily as a way to embed useful information on the desktop so you didn't have to open terminal applications or system utilities to see it. Take some time to familiarize yourself with the Unix commands here, and don't re-invent the wheel: there are a lot of people out there with scripts and geeklets ready to go that will add a personal touch to your Mac. Before you know it, you'll have a Mac desktop worth submitting to the Lifehacker Desktop Show and Tell pool.
I've by no means exhausted all you can do with GeekTool, so if you're a GeekTool guru, share your favorite geeklets and scripts in the comments.
You can reach Alan Henry, the author of this post, at alan@lifehacker.com, or better yet, follow him on Twitter or Google+.