diff options
author | Vasil Zlatanov <vasil.zlatanov@gmail.com> | 2015-03-01 14:23:21 +0100 |
---|---|---|
committer | Vasil Zlatanov <vasil.zlatanov@gmail.com> | 2015-03-01 14:23:21 +0100 |
commit | 9f3edcf84c9883c370a7b696bcbcac13f3bf6e32 (patch) | |
tree | f271de253b2d4220e073e43a4c008b79d8e85a90 /ratpoison/panel/music | |
parent | afc0c42c30e133218986e9352d81c56d868097e9 (diff) | |
download | dotfiles-9f3edcf84c9883c370a7b696bcbcac13f3bf6e32.tar.gz dotfiles-9f3edcf84c9883c370a7b696bcbcac13f3bf6e32.tar.bz2 dotfiles-9f3edcf84c9883c370a7b696bcbcac13f3bf6e32.zip |
fix music bar for short
Diffstat (limited to 'ratpoison/panel/music')
-rwxr-xr-x | ratpoison/panel/music | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ratpoison/panel/music b/ratpoison/panel/music index a01ad03..3de320d 100755 --- a/ratpoison/panel/music +++ b/ratpoison/panel/music @@ -18,6 +18,7 @@ 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 @@ -26,6 +27,9 @@ else symbol='P' fi +echo $f +echo $e +echo ${#new} 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/^ //'`" |