Conky doesn't want to work with $swapgraph

For short, i have
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}
${color}${execgraph $swapperc}

which also gave 0 result

Can somebody suggest me working option please?

That doesn’t seem to exist, but ${swapbar} does.

That’s not what i need, i want some graph like ${memgraph}

${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/ FF0000 FFFF00 1}

Save this as ~/.config/conky/


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/

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.