My GeekTool

I promised I would write about this earlier. I use my GeekTool to see the time from across the room, check the calendar, see what the weather’s like outside when I wake up, monitor my bandwidth, check the latest twitter message, and see if I have any unread emails in my inbox.

The Desktop

desktop_11_4_09

iTunes controller

itunes

This is a custom BowTie theme I made after modifying one of the default themes. I called it Chris because I didn’t ever plan on releasing it. You can grab it here: Chris.bowTie.zip

Time

time

There are just normal date commands:

  • Time: date “+%l:%M:%S %p”
  • Date: date +%A; date “+%B %d, %Y”

Calendar

calendar

The day header is just static text. The actual calendar is this command:

  • Calendar: cal | grep -v “[a-zA-Z*] [0-9]” | grep -v “Su”

Weather

weather
This geeklet uses a php file to grab the image off of Yahoo’s weather site. I used the script found
here to do this.

  • Temperature: curl –silent “http://xml.weather.yahoo.com/forecastrss?p=46750″ | grep -E ‘(Current Conditions:|F<BR)’ | sed -e ’s/Current Conditions://’ -e ’s/<br \/>//’ -e ’s/<b>//’ -e ’s/<\/b>//’ -e ’s/<BR \/>//’ -e ’s///’ -e ’s/<\/description>//’

Network

network

This section is to see my IP addresses for both my local and school networks. Here at college, I have to stay under a daily upload and download limit, so I load in my current daily up/down stats off of DD-WRT on my router.

  • IP Addresses: bash script
  • Bandwidth: curl -s http://root:admin@192.168.1.1/ttgraph.cgi?$(date +”%m-20%y” | sed “s/^[0]//”) | grep -E $(date “+d%d” | sed -e “s/^\d[0]/d/” -e “s/$/\”/” -e “s/^/\”/”) | awk ‘ { dl = $8;ul = $12; printf(“Router DL: %d MB\nRouter UL: %u MB\n”, dl, ul); }’

Twitter

twitter

This is another bash script. Make sure you set your own username and password. Here ya go.

Gmail

gmail

Yay, another bash script!. Be sure you put in your own account details.

And that’s it! Let me know if you have any questions about it in the Comments below.