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