11

I have included most of the geektool scripts below. Enjoy.

Uptime

uptime | awk '{print "UPTIME : " $3 " " $4 " " $5 " " }'; top -l 1 | awk '/PhysMem/ {print "RAM : " $8 " "}' ; top -l 2 | awk '/CPU usage/; NR; 5 {printf "CPU" $6, $7=":", $8, $9="user ", $10, $11="sys ", $12, $13}'

Load Average

top -n1 -l1 | grep "Load Avg" | sed 's/.*usage: //; s/ user.*//;'
top -n1 -l1 | grep "Load Avg" | sed 's/.*user, //; s/ sys.*//;'
top -n1 -l1 | grep "Load Avg" | sed 's/.*sys, //; s/ idle.*//;'

Good calendar red

cal | sed -E '1,$'"s/ ($(date +%e))( |$)/ $(echo '\033[1;31m')\1$(echo  '\033[0m')\2/"

Weather

Create an image screen with this url:

file:///tmp/weather_map_satelite.jpg

Then create a separate script with one of these:

Weather radar NY

curl --silent "http://www.weather.com/weather/map/USNY1265" | grep "mapImg" | sed 's/^.*src="//' | sed 's/".*$//' | xargs curl --silent -o /tmp/weather_map_satelite.jpg\

Weather Radar TX

curl --silent "http://www.weather.com/weather/map/USTX0617" | grep "mapImg" | sed 's/^.*src="//' | sed 's/".*$//' | xargs curl --silent -o /tmp/weather_map_satelite.jpg\

Weather radar MA

curl --silent "http://www.weather.com/weather/map/USMA0102" | grep "mapImg" | sed 's/^.*src="//' | sed 's/".*$//' | xargs curl --silent -o /tmp/weather_map_satelite.jpg\

Weather Radar LA

curl --silent "http://www.weather.com/weather/map/USCA0638" | grep "mapImg" | sed 's/^.*src="//' | sed 's/".*$//' | xargs curl --silent -o /tmp/weather_map_satelite.jpg\

Weather Radar London

curl --silent "http://www.weather.com/weather/map/UKXX0085" | grep "mapImg" | sed 's/^.*src="//' | sed 's/".*$//' | xargs curl --silent -o /tmp/weather_map_satelite.jpg\

Weather Radar Rome

curl --silent "http://www.weather.com/weather/map/ITXX0067" | grep "mapImg" | sed 's/^.*src="//' | sed 's/".*$//' | xargs curl --silent -o /tmp/weather_map_satelite.jpg\

Weather Radar Istanbul

curl --silent "http://www.weather.com/weather/map/TUXX0014" | grep "mapImg" | sed 's/^.*src="//' | sed 's/".*$//' | xargs curl --silent -o /tmp/weather_map_satelite.jpg\

Weather Radar Philly

curl --silent "http://www.weather.com/weather/map/USPA1276" | grep "mapImg" | sed 's/^.*src="//' | sed 's/".*$//' | xargs curl --silent -o /tmp/weather_map_satelite.jpg\

Comments

User Avatar
barndoor0311 105 days ago
Thank You!!
User Avatar
elspencero 103 days ago
Thanks for all the code. Looks great. I did notice that calendar doesn't line up properly. No matter how it is justified the dates will get off. do you know how to fix this? I don't. I'm a newb.
User Avatar
FrozN 60 days ago
@elspencero

You have to set the fixed-width font.

Log in to comment or register here.