loading...

Setting up GeekTool on OS X

october 12th, 2009 at 4:32 pm

GeekTool is a pretty awesome little utility for OS X; it lets you display arbitrary data on your desktop. This could be the output of a shell command, the contents of a file, or even an image. I've been using it for a while now, so I thought I'd share my setup.

my setup

My desktop

Spiffy, right? I've got uptime, wireless status, filesystem usage, and processes over on the left side, and in the lower right are outside temperature, my battery status, and the date.

using geektool

Using GeekTool isn't hard at all, but the software is still a little buggy, so you do have to be a little careful not to upset it. The first step, obviously, is to install it. They only officially support Leopard, but I've had success using it under Snow Leopard. If you're still on Tiger or older, you're probably out of luck. There's a program that does pretty much the same thing on Windows called Samurize, but Windows doesn't have all the awesome terminal utilities that Unix does, so I'm not sure how useful it is.

Anyway, GeekTool will install a prefpane that grants you access to all the program's features. The first thing you'll want to do is add an entry for the first box. On my setup, that would be uptime. Once you've added the entry, choose its type from the drop-down in the upper left corner. For my uptime box, you'd want to choose "shell" since you're executing a bash command. Then type the command in the text box, set the update interval, and play with the position and fonts. My uptime box refreshes every 10 seconds (which is probably more often than I need it to, but it hasn't caused problems yet) and I've got it set to use a transparent background with white text and a drop shadow. This makes it legible on just about any desktop background.

my code

If you want to straight-up duplicate my setup, the first thing you'll need are some fonts. The font on the left is Envy Code R, my absolute favorite monospace font, and on the right I'm using Futura. You are, of course, welcome to use whatever fonts you like.

Most of the commands I'm using are pretty simple, but here they are if you lack terminal skillz:

uptime, load, etc

uptime

wireless network status

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I If you want to know your IP address, MAC Address, or anything fancy about your adapter, try this one: ifconfig en1

filesystem usage

df / /Volumes/LaCie\ Disk Again, this will change based on the volumes you want to check, those are just the ones I care about. For all of them, just do df

processes

ps -ACcrO %cpu,%mem -O has way more options; check the man page for a complete list or do ps -L

Now, the weather and battery meter depend on perl scripts that I wrote, so you'll need to download those from the projects page. Here's generic code for executing perl scripts if you need it: perl path/to/script Also, you'll need to get an API key from weather.com if you want the weather script to work right. It's kind of a pain, but they have a nice pretty XML API that's fun to play with. Once you have those, just edit the script and plug in your ID and API key and you should be good to go.

date and time

date Date has a TON of options for formatting, so you might want to add some to suit your needs. I like having all the info, myself. If you just wanted some kind of fancy date format, like, say October 12, 2009 3:17 PM, you'd just do date "+%B %e, %Y %l:%I %p" Wikipedia actually has a good reference on the Unix date command, so go over there if you want to play with the format.

There are tons of people cooler than me who've done some pretty sweet things with GeekTool. Take a look in the links section for some inspiration.

links

read something else

« Older Post Newer Post »


ads

1 comment so far.

Misses Geektool
2 years ago

I used to use it, and loved it! However, I love Pathfinder more, and they are simply.... incompatible. I wish they could modify it somehow to work with Pathfinder too.

say something

some HTML (<strong>, <em>, <img>) is allowed.