11

Disk meter

Posted in System by jess 436 days ago

Pretty simple mod of the RAM meter by matt. To get it to point at a different disk partition just modify the awk statement in the first line of the script to whatever your partition is called (execute 'df' to see your disk partition names).

Here's the script:

myDisk=`df | awk '/dev\/disk0s2/ && NF>1 {print $5}' | sed 's/\%//'`
myDisk =`expr 100 - $myDisk `
typeset -i a=5
while [ $a -lt $myDisk ]
do
    echo "|\c"
    a=`expr $a + 5`
done
echo "\033[1;31m|\033[0m\c"
while [ $a -lt 100 ]
do
    echo "\033[1;30m|\033[0m\c"
    a=`expr $a + 5`
done
echo "\n"
unset myDisk
unset a

My minimal screen: I'm using the RAM- and CPU meters from blair1618 (the top two bars, link here) with two disk meters, and some inspiration from jalvani.

Geeklet files to download

Comments

Log in to comment or register here.