hello;

some of you know and some of you don't know that there's a great app called geektool to show terminal
command outputs on your desktop as a passive background text to make your
desktop look super cool. to be more clear, below is my screenshot and some
commands i am using.

Click to view attachment

the upper left purple output is the output of top command with some modifications, it show the last 7 processes.

the code is:
CODE
top -ocpu -FR -l2 -n20 | grep '^....[1234567890] ' | grep -v ' 0.0% ..:' | cut -c 1-24,33-42,64-77


you can modify the code as you like or just type "top" to see full output.

under that there's the system info in turquoise;
CODE
scutil --get ComputerName;
sw_vers | awk -F':\t' '{print $2}' | paste -d ' ' - - -;
sysctl -n hw.memsize | awk '{print $0/1073741824" GB RAM"}';
sysctl -n machdep.cpu.brand_string;


under that you see calender in pink:
CODE
cal | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed 's/./#/g') /"


uptime in blue:
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}'


disk information in yellow:
CODE
df -H -l


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


internal ip's are a little different:

you need to save the text below as whatever_name_you_like.bash
CODE
#! /bin/bash

myen0=`ifconfig en0 | grep "inet " | grep -v 127.0.0.1 | awk '{print $2}'`

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}'`

if [ "myen1" != "" ]
then
echo "airport : $myen1"
else
echo "airport : INACTIVE"
fi


and then in geektool shell you put:
CODE
bash /path/to/whatever_name_you_like.bash


i changed "ethernet" and "airport" to my network interfaces which are "atherosL1" and "RTL8139".
you can also do it. "ethernet " is for the (en0) interface and "rtl8139" is for the (en1) interface.
you can also add a (en2) network interface if you like.

lastly my favorite command to pull your twitter feed(in red);
CODE
curl -s -u username:password http://twitter.com/statuses/friends_timeline.rss | grep title | sed -e 's/<title>/ /' | sed -e 's/<\/title>/ /'

you need to change "username:password" to your username and password.

a last note for the noobs: you put all these commands to the shell tab of the geektool in command box.
dont try to put them to file tab or the image tab. i'm serious don't try, it won't work tongue.gif

cheers!

btw, sorry for the shitty looking post. i couldn't figure out why does it looks like that