aboutsummaryrefslogtreecommitdiff
path: root/ratpoison/panel/music
diff options
context:
space:
mode:
authorvaskozl <vasil.zlatanov@gmail.com>2015-03-15 10:32:23 +0100
committervaskozl <vasil.zlatanov@gmail.com>2015-03-15 10:32:23 +0100
commitfb6adf8e60a1875ff6a5ea2574c783d9023ea5d7 (patch)
tree098c07115f0f08ff795ae74ae00c419a8cb9cee0 /ratpoison/panel/music
parentd9925d31e86b652913d0364684b1dadc70ecf2a7 (diff)
parent02dbe85011616cc97332c7e56e39a8989c45de08 (diff)
downloaddotfiles-fb6adf8e60a1875ff6a5ea2574c783d9023ea5d7.tar.gz
dotfiles-fb6adf8e60a1875ff6a5ea2574c783d9023ea5d7.tar.bz2
dotfiles-fb6adf8e60a1875ff6a5ea2574c783d9023ea5d7.zip
Merge branch 'master' of github.com:Vaskozl/dotfiles
Diffstat (limited to 'ratpoison/panel/music')
-rwxr-xr-xratpoison/panel/music31
1 files changed, 2 insertions, 29 deletions
diff --git a/ratpoison/panel/music b/ratpoison/panel/music
index 3de320d..caec3d7 100755
--- a/ratpoison/panel/music
+++ b/ratpoison/panel/music
@@ -1,25 +1,8 @@
#!/bin/sh
-
-f=1
-d=30 # width
-
while true;do
new=`mpc current`
-if [ "$old" != "$new" ];then
-f=1;
-old="$new"
-fi
-
-
-e=$(expr $f + $d)
-
-if [ $e -gt ${#new} ];then
-e=${#new}
-f=$(expr $e - $d)
-if [ $f -lt 1 ];then f=1;fi
-fi
if mpc | grep -q playing; then
symbol='p'
@@ -27,17 +10,7 @@ else
symbol='P'
fi
-echo $f
-echo $e
-echo ${#new}
-echo "$symbol`echo $new | cut --bytes $f-$e`"
+echo "$symbol`echo $new | cut --bytes 1-30`"
echo "K`mpc -h 127.0.0.1 volume | perl -pe 's/^volume://' | perl -pe 's/%$//' | perl -pe 's/^ //'`"
-
-f=$(expr $d / 2 + $f)
-
-if [ $e == ${#new} ];then
-f=1;
-fi
-
-sleep 2;
+mpc idle > /dev/null
done