From 91eaf103ca19d5956cf8e70a5182d643d7099987 Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Tue, 1 Apr 2014 22:00:13 +0200 Subject: [PATCH] mpc status --- Utils/octopus.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Utils/octopus.sh b/Utils/octopus.sh index da4e58f..1bc4176 100755 --- a/Utils/octopus.sh +++ b/Utils/octopus.sh @@ -103,12 +103,18 @@ case $1 in ## VOLUME=`amixer get Master | grep '\[' | cut -d' ' -f6` 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` MEMCACHED=`awk '/Cached/ {printf( "%.0f", $2 / 10240 )}' /proc/meminfo` MEMFT=`echo "$MEMFREE + $MEMCACHED" | bc` 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 ;;