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