Is it possible to change update interval in Conky for specific variables?

Is it possible to change the update interval in Conky for specific variables? Can I change it just like I would change the font in a Conky?


I was googling the same thing and this came up as a result so I wanted to set it straight.

It IS possible to do so, conky provides the following :

execi Same as exec but with specific interval. Interval can't be less than update_interval in configuration. See also $texeci

Usage: ${execi time-in-second bash-command-here}

Reference: http://conky.sourceforge.net/variables.html


As far as I know, conky has a single update_interval parameter which applies to all of the running .conkyrc file.

If you want some parameters to be monitored at different intervals, use a separate rc file and run 2 (or more) instances of conky.


Short answer: It is not possible when sticking to conky's built in variables and functions alone.

Long answer: There is a way. First of all, what Csaba said in the other comment, is not entirely true: So if you don't update tens of parameters every second, you shouldn't see more thant 2-3% extra CPU usage. It's not necessarily about amounts of parameters. You might already require update_interval to be set to 0.5 or smaller, if you use just one mere line of scrolling text (like in my case). Try it out yourself. Scrolling text will run literally at snail's pace at standard value of update_interval.

But you won't want other things to update as hectically as this (except for graphs perhaps), so what can you do?

Outsource the code which needs to be in a greater interval. Even though some conky functions might exist for it, use replacement functions from bash (or even Python), put them in a script and ${execi} respectively ${texeci} them with your desired greater interval. In some cases, you may as well want to use ${execpi} resp. ${texecpi} since the latter two will also allow you to use a line like echo "${color aabbcc}" in a bash script parsed by conky for built-in parameters / variables.