You are not logged in.

#1 2016-10-08 10:33:47

galvs
Member
Registered: 2016-10-08
Posts: 2

[conky] Disappearing icons

Hi,

I am using conky config and piping it into dzen2 but the moment I include ${battery_percent} to go after the icon, the icon disappears. Any advice?

thanks!

Dzen Pipe

conky -c .conky_dzen2 | dzen2 -e - -h '28' -x 800 -w '1200' -fn "-*-dejavu sans-*-r-*-*-20-*-*-*-*-*-*-*" -bg "#073642" -fg "#b58900"

Conky Config

conky.config = {
background		= true,
out_to_console 		= true,
out_to_x		= false,
update_interval		= 10,
use_spacer		= 'right',
use_xft			= true,
override_utf8_locale 	= true,
alignment		= 'top_right',
template0        	= [[${exec echo $CONKY_ICON}]],
template1       	= [[${exec echo $CONKY_NORMAL}]],
template2        	= [[${exec echo $CONKY_GREEN}]],
template3        	= [[${exec echo $CONKY_YELLOW}]],
template4        	= [[${exec echo $CONKY_RED}]]
};

conky.text = [[
# Battery
^fg(${template2})^i(${template0}ac-charged.xbm)
${battery_percent}
]];

Last edited by galvs (2016-10-08 11:15:47)

Offline

#2 2016-10-09 12:53:15

rtoijala
Member
Registered: 2011-09-11
Posts: 36

Re: [conky] Disappearing icons

You are missing a backslash ('\') after the line with the icon.
Conky interprets your input as two lines, one with the icon and the second with the percentage.
It then shows only the last line.
Ending the first line with a backslash tells Conky that it should treat the second line as a continuation of the first.
So, the correct way to write your example would be

conky.text = [[
# Battery
^fg(${template2})^i(${template0}ac-charged.xbm)\
${battery_percent}
]];

Offline

Board footer

Powered by FluxBB