For short, i have
${color}${swapgraph}
string in config file, but for some reason Conky seems to not know such var and does not render any graph… just raw string from .conf
I also tried to use something like
${color}${lua_graph $swapperc}
or
${color}${execgraph $swapperc}
which also gave 0 result
Can somebody suggest me working option please?
dmt
May 1, 2023, 10:21pm
2
gamer_girl_2007_nah:
${swapgraph}
That doesn’t seem to exist, but ${swapbar}
does.
dmt:
${swapbar}
That’s not what i need, i want some graph like ${memgraph}
dmt
May 2, 2023, 2:15am
5
${execgraph}
takes a bash command or script.
${lua-graph}
takes a lua function.
${swapperc}
is a variable.
How about something like this?
${execgraph ~/.config/conky/swap.sh FF0000 FFFF00 1}
Save this as ~/.config/conky/swap.sh
#!/usr/bin/bash
total=$(grep SwapTotal /proc/meminfo | awk '{print $2}' )
free=$(grep SwapFree /proc/meminfo | awk '{print $2}' )
printf %.2f $(echo "scale=4; (($total - $free) / $total) * 100" | bc)
Make it executable.
chmod +x ~/.config/conky/swap.sh
system
Closed
May 4, 2023, 4:15pm
6
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.