This are an ever growing compilation of scripts and code snippets that I have written or collected in a format that’s easy to understand and use. If you need any help feel free to email me at nic@nicinabox.com.
I encourage you to checkout some of the Desktop screenshots on Flickr (some are very nice!) for ideas.If you have a script or something clever you’d like to add to this collection, please contact me.
Current Version: 0.6
Includes:
- Network info
- Unread Gmail
- Uptime
- Calendar (with current day denoted)
- Weather
- System Stats
- Recent Music plays
Network Info
ifconfig en1 | grep "inet " | awk '{print $2}'
161.45.27.132
Unread Gmail
chkgmail
4 Unread
Uptime
uptime | awk '{print "Uptime : " $3 " " $4 " " $5 }' | sed -e 's/.$//g'
Uptime : 1 day, 17:54
Calendar
cal | awk -v cday=`date "+%d"` '{ fill=(int(cday)>9?"":" "); \
a=$0; sub(" "fill int(cday)" ","["fill int(cday)"]",a); print a }'
March 2009 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Weather
weather -cm 37130
55F | 81F Fair
weather 37130
80F
System Stats
top -orsize -FR -l1 | grep % | grep -v Load | grep -v COMMAND | cut -c 7-19,64-69
firefox-bi 281M kernel_tas 160M iTunes 113M WindowServ 63M Finder 61M Quicksilve 56M mds 47M Last.fm 42M ForkLift 37M TextMate 31M Font Book 27M YouControl 21M GrowlHelpe 19M coreservic 18M GeekTool 16M Spotlight 14M mysqld 12M ATSServer 12M Dock 12M
Recent music Plays
curl -s http://localhost/tunes.php
4:58 Sigur Rós : Untitled #6 Reversed 4:56 Talkdemonic : Indian Angel 4:46 Caspian : Moksha 4:42 The Album Leaf : Another Day 4:35 A Silver Mt. Zion : For Wanda 4:30 Mogwai : I Know You Are but What Am I 4:17 Mono & World's End Girlfriend : Palmless Prayer / Mass Murder Refrain (#2) 3:55 Godspeed You! Black Emperor : Motherfucker=Redeemer (Part One) 3:52 Rachel's : The Last Light 3:49 Set Fire to Flames : Small Steps Against Inertia/Echo Of A Dead



