execbar in conky does not seem to be working properly.
So if I do in a bash script (named myscript.sh)
# moc or mocp is Music on Console
totalsec=$(mocp --info | grep "TotalSec" | cut -d: -f2 | sed 's/^ //g' | sed 's/ $//g')
cursec=$(mocp --info | grep "CurrentSec" | cut -d: -f2 | sed 's/^ //g' | sed 's/ $//g')
progress=$(echo "(${cursec}*100/${totalsec})" | bc)
echo "\${execbar echo ${progress}}"
echo "${progress}" # This works and shows be the value of the integer variable.
and then call the bash script from conky using
conky.text = [[${execpi 3 ./myscript.sh}]];
then progress bar is not shown. Only a white rectangle.
However, if the same bash script is changed to
progress=23
echo "\${execbar echo ${progress}}"
then it works and shows a constant bar of 23
.
Don't know why passing a integer variable is not working.
Any help to solve this problem will be appreciated.