Geektool scripts

Joined
Nov 2, 2011
Messages
7
Reaction score
0
Points
1
Here is what i have made with geektool,
ScreenShot2011-11-02at103624PM.png

Here Are The Scripts i used
Calendar:
Code:
cal
day:
Code:
date +%A
date:
Code:
date +%d
Month:
Code:
date +%B
time :
Code:
date "+%l:%M"
Am/Pm:
Code:
date +%p
Uptime:
Code:
uptime | awk '{print "" $3 }' | sed -e 's/.$//g';
hard drive space:
Code:
df -hl | grep disk1 | awk '{print $4 }'
hard drive space percentage :
Code:
df -hl | grep disk1 | awk '{print $5 }'
Cpu :
Code:
#!/bin/sh

# in 10.5 use the following:
#cpu=$(top -l 1| grep 'Load Avg' | awk '{print $12, $13}')
# in 10.6 use the following:
cpu=$(top -l 1|grep 'CPU usage' | awk '{print $7}')
inactivemem=$(top -l 1 | awk '/PhysMem/ {print $6}')
freemem=$(top -l 1 | awk '/PhysMem/ {print $10}')

if [ "$(echo ${inactivemem} | egrep '.*G$')" ]; then
    inactivemem=$(echo ${inactivemem} | cut -d 'G' -f 1)
    let inactivemem=${inactivemem}*1024
else
    inactivemem=$(echo ${inactivemem} | cut -d 'M' -f 1)
fi

if [ "$(echo ${freemem} | egrep '.*G$')" ]; then
    freemem=$(echo ${freemem} | cut -d 'G' -f 1)
    let freemem=${freemem}*1024
else
    freemem=$(echo ${freemem} | cut -d 'M' -f 1)
fi

let freemem=${freemem}+${inactivemem}

freemem=$(echo "scale=2; ${freemem} / 1024" | bc)
uptime=$(uptime | awk '{print $3 " " $4 " " $5 }' | sed -e 's/.$//g')


echo ${cpu}
RAM:
Code:
top -l 1 | awk '/PhysMem/ {print "" $8 " "}' ;
for the batter percentage and weather i used yahoo widgets here are the links to them
Weather: http://www.widgets.yahoo.com/widgets/widescapeweather
battery: http://www.widgets.yahoo.com/widgets/wdscp-battery
The font is available for download here: http://www.dafont.com/comic-book.font



the hard drive space is edited for mac osx lion use for the snow leopard and lower here it is:
Code:
 df -h | grep disk0s2 | awk '{print $4 }'
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top