Changing borders colors of graphs and bars (en)
From Conky PitStop
Changing borders colors of graphs and bars
Language | English Français |
Example for graphs
default_color FFFFFF #white draw_graph_borders yes color1 00FF00 # green TEXT ${color1} ${cpugraph 50,200 FFFF00 FF0000 s}
The default color of graph borders is whatever the conky default color is set to using:
default_color
Second line is needed for drawing borders:
draw_graph_borders yes
When setting
${color xxxxxx}
in front of the graph, it changes the color of the border.
Then we change the color of the graph with:
${cpugraph 50,200 FFFF00 FF0000 s}
Example for bars
default_bar_size 200 25 color1 00FF99 color2 FF00FF TEXT $color1 ${cpubar} ${voffset -43}${color2} ${execbar echo 0}
First line defines the default size of all graphs:
default_bar_size 200 25
Then we define two colors:
color1 00FF99 color2 FF00FF
We draw the cpubar with color1:
${color1} ${cpubar}
And then, we draw a second bar at the same position (with voffset). This second bar has a value of O, so only the border is shown
${voffset -43}${color2} ${execbar echo 0}
Alternative, draw a bar with a cpu that is not on your computer, the output will be zero
${voffset -43}${color2} ${cpubar cpu5}
Note: the value used for $voffset needs to be adjusted for your own conky.
The same on one line:
${goto 0}$color2 ${cpubar}${goto 0}$color3 ${execbar echo 0}
More info at $goto, $offset and $voffset