I'm having an issue with dynamic positioning of images. Basically I made a Conky theme that will move depending on the circumstances. At the bottom of this theme is a process table. I have images inserted as the vertical lines of this table, but I need them to move automatically.

I have a script that will return either 560, 610, or 660 depending on the circumstance. These numbers are y coordinates for the images. I can display the output of the script in Conky via the command: ${exec bash /etc/conky/network.sh}. How can I use this as an integer to position my images? I've tried: ${image /etc/conky/Line.png -p 120, ${exec bash /etc/conky/network.sh} -s 1x180} to no avail. Any suggestions?

execp   command  differs from $exec in that it parses the output of the command, so you can insert things like ${color red}hi!${color} in your script and have it correctly parsed by Conky. Caveats: Conky parses and evaluates the output of $execp every time Conky loops, and then destroys all the objects. If you try to use anything like $execi within an $execp statement, it will functionally run at the same interval that the $execp statement runs, as it is created and destroyed at every interval. 

you can have /etc/conky/network.sh output: ${image /etc/conky/Line.png -p 120,560 -s 1x180} or output the other 2 if you can determine the circumstances in the script.

this${execp bash /etc/conky/network.sh}

will replace ${image /etc/conky/Line.png -p 120, ${exec bash /etc/conky/network.sh} -s 1x180}

in your script

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.