Is there a way to make membar
and fs_bar
have gradient colors in conky? What I exactly need GREEN
when the usage is low, YELLOW
when mid-range, and RED
when there is high usage of memory and disk space.
Asked
Active
Viewed 329 times
1 Answers
1
The only way to do this easily is to write some code in lua
. If you search you should find many examples, such as this. It uses a highly parameterable bargraph function.
For something simple in pure conky, you can use if_match
to change the colour of the entire bar, eg:
${if_match $memperc>60} ${color red} $else ${color green} $endif ${membar 20,100}
You would need to nest another test for a yellow stage, and remove the spaces above if you do not want them to appear in the output.

meuh
- 11,500
- 2
- 29
- 45
-
I think if_match would be a great idea. Thank you.. – mlwn May 29 '21 at 12:35