From 9f3edcf84c9883c370a7b696bcbcac13f3bf6e32 Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Sun, 1 Mar 2015 14:23:21 +0100 Subject: fix music bar for short --- ratpoison/panel/music | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ratpoison/panel') 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/^ //'`" -- cgit v1.2.3-54-g00ecf