Geek Tool - because you have far too much time to waste

Posted by: dirt

Tagged in: pretty-shiny , OS X , Geek Tool

I've been using Geek Tool for several years now and I finally updated to 3.0rc5.  I'm not into the pretty-shiny aspect of it as much as some people are, but it certainly can make some attractive and useful desktop effects.  Here is a screenshot of a blank desktop and then one showing the placement of the Geeklets.



And here's the code I used (clockwise in the geeklets screenshot)

Day of the week
date +%A


Numeral Day
date +%d


Month
date +%B


Time
date +"%I:%M"


AM/PM
date +"%p"


Calendar
cal | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed 's/./#/g') /"


Uptime
uptime


System Processes
CurYear=$(date +"%Y")
top -l 2  | sed 10q | grep -Ev "$CurYear|Load Avg|SharedLibs|MemRegions|VM" | sed 's/[0-9].*wired,.*[0-9].*active,.*[0-9].*inactive,//'| sed 's/^[[:space:]]*(.*)[[:space:]]*$/1/' | sed 's/,/    /g'


Weather (change Boise, ID to your City and State and in the two Yahoo Weather URL's change 83713 to your zip code)
echo "Boise, ID"
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=83713&u=f" | grep -e "Current Conditions" -A 1 | tail -n 1 | sed -e 's/
//' curl --silent "http://xml.weather.yahoo.com/forecastrss?p=83713&u=f" | grep -e "Forecast:" -A 2 | tail -n 2 | sed -e 's/
//' -e 's/
//' | sed "s/(.*). (.*)/1?2/" | tr "?" " " | sed "s/High: (.*) Low: (.*)/?H: 1 L: 2/" | sed "s/?(.*)/1/"


External IP
echo External IP: `curl -s http://checkip.dyndns.org/ | sed 's/[a-zA-Z<>/ :]//g'`


System Profile
system_profiler SPHardwareDataType SPSoftwareDataType | perl -e '@info= <>; $info= join("", @info);if($info=~m@[ ]+s*Computer Name:s*([^ ]+)[ ]+@) {print "$1 ";}if($info=~m@[ ]+s*System Version:s*([^ ]+)[ ]+@) {print "$1 ";}if($info=~m@[ ]+s*Memory:s*([^ ]+)[ ]+@) {print "$1 ";}if($info=~m@[ ]+s*Total Number Of Cores:s*([^ ]+)[ ]+@) {print "$1 x ";}if($info=~m@[ ]+s*Processor Speed:s*([^ ]+)[ ]+@) {print "$1 ";}if($info=~m@[ ]+s*Processor Name:s*([^ ]+)[ ]+@) {print "$1 ";}'


Hard drive info
df -h | grep disk0s2 | awk '{print "Macintosh HD:", $2, "total,", $3, "used,", $4, "remaining"}'