diff --git a/Utils/octopus.sh b/Utils/octopus.sh index ace42b3..64a5c6e 100755 --- a/Utils/octopus.sh +++ b/Utils/octopus.sh @@ -54,9 +54,12 @@ case $1 in BATT_TIME=$(acpi -b | cut -d, -f3 | cut -d" " -f2) #BATT=$( acpi -b | sed 's/.*[charg.|], \([0-9]*\)%.*/\1/gi' ) VOLUME=`amixer get Master | tail -n 2 | head -n 1 | cut -d' ' -f7` - MEM=`awk '/MemFree/ {printf( "%.0fMb", $2 / 1024 )}' /proc/meminfo` - xsetroot -name "Vol $VOLUME :: $MEM Free :: Bat $BATT_PCT $BATT_TIME :: $DATE" + MEMFREE=`awk '/MemFree/ {printf( "%.0f", $2 / 1024 )}' /proc/meminfo` + MEMCACHED=`awk '/Cached/ {printf( "%.0f", $2 / 10240 )}' /proc/meminfo` + MEMFT=`echo "$MEMFREE + $MEMCACHED" | bc` + + xsetroot -name "Vol $VOLUME :: $MEMFT Mb Free :: Bat $BATT_PCT $BATT_TIME :: $DATE" ;; "wallpaper")