You are not logged in.
Hello,
I have a really weird behavior with the way my Conky displays mocp-related stuff.
Basically, I have this bit of code in the moc-player section:
${if_running mocp}${voffset 2}${font NotoSans:size=8.6}${color3}${exec mocp -Q %song}${font}
${voffset 2}${font NotoSans:size=8.6}${color3}${scroll 30 0 ${exec mocp -Q %artist}}${font}${alignr}${font NotoSans:size=8.6}${color3}${exec mocp -Q %ct} / ${exec mocp -Q %tt}${font}
${voffset 2}${font NotoSans:size=8.6}${color3}${exec mocp -Q %album}${font}
${execbar mocp -Q '%cs/%ts*100' | bc -l}
${execi 1 ~/bin/getcdmocp.sh}
${image /tmp/covers -p 0,1040 -s 240x240}
$endif
It works great if mocp is indeed running. And it correctly shows nothing if I had just rebooted the PC and never started mocp.
However, if I start mocp and quit it later (with a capital Q, so it is indeed quitting mocp not just exiting), this conky section shows up for a several seconds and then turns off for several seconds, repeatedly, pretty much forever. Basically, conky thinks that mocp is running for a few seconds and then is not running for a few seconds. I checked htop and did a filter for mocp, and it is indeed NOT running after quitting mocp, but conky seems to think it is.
Any idea what is happening? Is there some trick with the conky settings that I need to tweak?
Thanks!
Offline
that is indeed weird.
according to this you need to have some ${top ...} variable in your conky to have it work.
on a side note, may i add that you are executing 5 (!) "mocp -Q ..." every $update_interval, plus a shell script.
this is not exactly lightweight.
also, in my experience, mocp is acting up sometimes. i try to reduce my queries to mocp to 1 "mocp -i" instead.
Last edited by ohnonot (2021-07-03 09:26:41)
Offline
Thanks. Yea, I do have ${top ...} variables in my conky. Still can't figure out what is happening with the strange behavior, though. But thanks for the heads up on the rest. I took a look and realized, I could get rid of a couple of calls to mocp. Will see what I can do to make it more efficient.
Offline
I do have ${top ...} variables in my conky. Still can't figure out what is happening with the strange behavior, though.
weird. can't reproduce.
instead of htop, try to verify it with "pidof mocp". grasping at straws, but who knows, maybe htop is wrong.
also try if_running /usr/bin/mocp ?
Offline