For a while now I have been enjoying the benefits that Geek Tool provides in terms of embedding little bits of information on your desktop. Along with displaying information it also gives you the ability to sex up your desk top a bit and make it look truly unique.
I wanted to share some of my experiences with fellow MacTalkers and spread the Geek Tool love. Questions and comments are welcome
What is Geek Tool?
GeekTool is a PrefPane (System Preferences module) for Panther, Tiger or Leopard to show system logs, unix commands output, or images (i.e. from the internet) on your desktop (or even in front of all windows).
It has three types of modes or types of information you can display. You can use File mode to monitor MacOS X activity with /var/tmp/console.log or /var/log/system.log, or Shell mode to launch custom scripts or commands like "df" to check space left on filesystems, "uptime" to monitor load of your machine. Finally, Image mode helps you monitor bandwith usage, CPU loads, memory availability of your server, via tools like MRTG or RRD.
Where can I get it?
Tynsoe projects
How does it install?
As mentioned above it installs as a preferance pane and is easily deleted by right clicking and removing.
OK....so what can I do with it?
The best way to show its usefulness is to show you my desktop and explain how some the items were made. With a basic knowledge of unix commands you can easily create great looking desktops in GeekTool.
Let's look at a screen:
On the left hand side there is information about connectivity to the network, uptime, ram usage, cpu usage and disk info. In the lower left corner, 3 panels showing top 10 apps by RAM, CPU and Process time.
In the center is a dump of the system log.
The right hand side has a embedded image showing weather radar and a small ascii calendar.
Hmmm....my geekness has been stimulated....go on...
Let's break each element down. I assume by this stage you have eagerly downloaded GeekTool and want to explore some geek goodness.
Display Your Computers Uptime And Total CPU/Memory Usage
The Uptime, RAM and CPU usage were made by selecting the Shell type from the dropdown and using this code:
Code:
uptime | awk '{print "UPTIME : " $3 " " $4 " " $5 }' | sed -e 's/.$//g'; top -l 1 | awk '/PhysMem/ {print "RAM : " $8 " "}' ; top -l 2 | awk '/CPU usage/ && NR > 5 {print $6, $7=":", $8, $9="user ", $10, $11="sys ", $12, $13}'
The result should give you this:
Display Drive Info
To display File system (drive) info, create another Shell type entry and use the following code:
You should have something like this displayed:
Display IP Address and Network Info
The IP address and network display requires a bit of trickiness. There may be an easier way (suggestions always welcome) but in this method we create a script file and then refer to it in GeekTool.
We need to create a file named ipadd.bash
Create it anywhere convenient and then, in Terminal use chmod to make it executable by navigating in Terminal to the folder with the file and typing chmod 755 ipadd.bash
The file needs the following code pasted into it:
Code:
#! /bin/bash
myvar1=`system_profiler SPAirPortDataType | grep -e "Current Wireless Network:" | awk '{print $4}'`
myvar2=`system_profiler SPAirPortDataType | grep -e "Wireless Channel:" | awk '{print $3}'`
echo "External :" `curl -s http://checkip.dyndns.org/ | awk '{print $6}' | cut -f 1 -d "<"`
myen0=`ifconfig en0 | grep "inet " | grep -v 127.0.0.1 | awk '{print $2}'| grep -v inet`
if [ "$myen0" != "" ]
then
echo "Ethernet : $myen0"
else
echo "Ethernet : INACTIVE"
fi
myen1=`ifconfig en1 | grep "inet " | grep -v 127.0.0.1 | awk '{print $2}'| grep -v inet`
if [ "myen1" != "" ]
then
echo "AirPort : $myen1 [$myvar1 : CH.$myvar2]"
else
echo "Airport : INACTIVE"
fi
Now in GeekTool create a new Shell entry and type the following (replace the path with your path info to the file.
Code:
bash /Users/jvl_iMac/bin/ipadd.bash
Your result should like this:
Part 2 coming soon.....please let me know if this sparked anybody's interest.