aboutsummaryrefslogtreecommitdiff
path: root/Window_Manager/ratpoison/panel/monce
diff options
context:
space:
mode:
Diffstat (limited to 'Window_Manager/ratpoison/panel/monce')
-rwxr-xr-xWindow_Manager/ratpoison/panel/monce25
1 files changed, 25 insertions, 0 deletions
diff --git a/Window_Manager/ratpoison/panel/monce b/Window_Manager/ratpoison/panel/monce
new file mode 100755
index 0000000..caa316c
--- /dev/null
+++ b/Window_Manager/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/^ //'`"
+
+