Conky Battery Info Hide/Display

Compiz, KDE, Gnome, Fluxbox, etc...

Moderator: Moderators

Conky Battery Info Hide/Display

Postby thegreg » Sat Nov 17, 2012 12:19

Hello, i need help. How to make conky hide battery info, when battery is not present?
This is what i have now:

${color grey}Battery ${color}${battery BAT1}
${color grey}Remain: ${color}${battery_percent BAT1}%
${color grey}Time: ${color}${battery_time BAT1}

What i want, is to hide the two last lines, when in first line battery status is "not present".
thegreg
Baby Hen
 
Posts: 2
Joined: Tue Nov 13, 2012 9:53

Re: Conky Battery Info Hide/Display

Postby elvis » Sat Nov 17, 2012 12:53

Try this one:

Code: Select all
${if_up battery}
${color grey}Battery ${color}${battery BAT1}
${color grey}Remain: ${color}${battery_percent BAT1}%
${color grey}Time: ${color}${battery_time BAT1}
${endif}


If not working, maybe you should try the if_existing variable, but I'm not sure how to locate the effective battery path whitin /sys
Sabayon Linux LXDE 64 bit @ Lenovo ThinkPad Edge E130
elvis
Simple Hen
 
Posts: 75
Joined: Sun Aug 26, 2012 22:34
Location: Italy


Return to 3D Desktops and Window Managers

Who is online

Users browsing this forum: No registered users and 1 guest

cron