aboutsummaryrefslogtreecommitdiff
path: root/ratpoison/panel/monce
diff options
context:
space:
mode:
Diffstat (limited to 'ratpoison/panel/monce')
-rwxr-xr-xratpoison/panel/monce25
1 files changed, 25 insertions, 0 deletions
diff --git a/ratpoison/panel/monce b/ratpoison/panel/monce
new file mode 100755
index 0000000..caa316c
--- /dev/null
+++ b/ratpoison/panel/monce
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+
+f=1
+d=30 # width
+
+new=`mpc current`
+if [ "$old" != "$new" ];then
+f=1;
+old="$new"
+fi
+
+
+e=$(expr $f + $d)
+
+if mpc | grep -q playing; then
+symbol='p'
+else
+symbol='P'
+fi
+
+echo "$symbol`echo $new | cut --bytes $f-$e`"
+echo "K`mpc -h 127.0.0.1 volume | perl -pe 's/^volume://' | perl -pe 's/%$//' | perl -pe 's/^ //'`"
+
+