8

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?

0

3 Answers 3

13

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

1
  • I have accepted this answer instead of earlier accepted answer, since in two years between the answers, Conky's might have gotten new options.
    – Akilan
    Oct 20, 2021 at 17:26
5

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.

2
  • oh oh.. :( how does running two instances of conky with half the items monitored by each compare with running only one instance with all items combined? For simplicity sake let us assume all three instances use same update_interval.
    – Akilan
    Jul 16, 2010 at 10:10
  • 1
    Conky is pretty light on resources. So if you don't update tens of parameters every second, you shouldn't see more thant 2-3% extra CPU usage for running the same amount of items as you current conky, but split in 3 conky processes. Also, if you plan to split it to reduce cpu usage by rarely changing but frequently updated parameters, running several conky processes is a good way. Also, with more processes, you can place each wherever you want on your screen. Jul 16, 2010 at 11:17
1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .