mpc status

This commit is contained in:
Frank Villaro-Dixon 2014-04-01 22:00:13 +02:00
parent c2fb454299
commit 91eaf103ca

View file

@ -103,12 +103,18 @@ case $1 in
## VOLUME=`amixer get Master | grep '\[' | cut -d' ' -f6` ## VOLUME=`amixer get Master | grep '\[' | cut -d' ' -f6`
SONG=`mpc | head -n 1 | cut -d. -f1` SONG=`mpc | head -n 1 | cut -d. -f1`
if [ -n `mpc | grep paused` ]; then
STAT=">"
else
STAT="||"
fi;
MEMFREE=`awk '/MemFree/ {printf( "%.0f", $2 / 1024 )}' /proc/meminfo` MEMFREE=`awk '/MemFree/ {printf( "%.0f", $2 / 1024 )}' /proc/meminfo`
MEMCACHED=`awk '/Cached/ {printf( "%.0f", $2 / 10240 )}' /proc/meminfo` MEMCACHED=`awk '/Cached/ {printf( "%.0f", $2 / 10240 )}' /proc/meminfo`
MEMFT=`echo "$MEMFREE + $MEMCACHED" | bc` MEMFT=`echo "$MEMFREE + $MEMCACHED" | bc`
BEAT_TIME=`beat -v` BEAT_TIME=`beat -v`
xsetroot -name "Vol $VOLUME :: [$SONG] :: $MEMFT Mb Free :: Bat $BATT_PCT $BATT_TIME :: $DATE (@$BEAT_TIME)" || true xsetroot -name "Vol $VOLUME :: [$STAT $SONG] :: $MEMFT Mb Free :: Bat $BATT_PCT $BATT_TIME :: $DATE (@$BEAT_TIME)" || true
$0 conf-ifaces $0 conf-ifaces
;; ;;