[CONKY] Fix the problem when there was the 'position' string in title

This commit is contained in:
Gregory Trolliet 2020-05-19 13:23:47 +02:00
parent 5f194a817e
commit cab7e6c4a5

View file

@ -6,8 +6,8 @@
## Requires 'bc' for calculating percentage. ## Requires 'bc' for calculating percentage.
if cmus-remote -Q &>/dev/null ; then if cmus-remote -Q &>/dev/null ; then
DUR=$( cmus-remote -Q | grep "duration" | cut -c10- ) DUR=$( cmus-remote -Q | grep "duration " | cut -c10- )
POS=$( cmus-remote -Q | grep "position" | cut -c10- ) POS=$( cmus-remote -Q | grep "position " | cut -c10- )
echo "($POS/$DUR)*100" | bc -l echo "($POS/$DUR)*100" | bc -l
fi fi