0

Hello cipricus or someone that can help.

I'm just started using deadbeef conky progressbar by cipricus

Very 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 conky

  • To get a user's attention you need to write @username - or comment under a post by that user. – user32012 Jul 7 '17 at 9:31
0

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/bash
deadbeef --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
}'
  • Hi meuh! Your adds of code works very well. Now the progressbar is shown even when the player is stoped. Those numbers are gone... Thank you very much for your help! Regards! Nili – Nili Jun 11 '17 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.