Hello cipricus or someone that can help.I'm just started using deadbeef conky progressbar by cipricusVery nice script i must say, but... I got an issue, if deadbeef is stoped, the progressbar showing some numbers. As you can note on the picture below.If player is running... everythings display correct regarding progressbar.Do you have any suggestions or solutions to make progressbar visible even if player is stoped?Thanks again!
DeaDBeeF progressbar for conky (cipricus code)
conky;deadbeef
I don't have the deadbeef program to test with, but it seems when it is stopped that the --nowplaying option will return the string nothing. The awk script is expecting two times, so it ought to return a division by zero error. However, your awk is returning -2147483647 in this case.You can try editing the awk script to the following to cope by checking for the string, and also checking for division by zero at the end:#!/bin/bashdeadbeef --nowplaying %e %l |awk '/nothing/{ print 0;exit }{ n = split(:: $1,t,:)  elapsed = (t[n-2]*60+t[n-1])*60+t[n]  n = split(:: $2,t,:)  total = (t[n-2]*60+t[n-1])*60+t[n]  if(total==0)total = 1  printf %d\n,elapsed*100/total}'