View Single Post
Posts: 9 | Thanked: 7 times | Joined on Dec 2009
#40
First of all: Thank you fnordianslip and rcull for your wonderful work here.

Originally Posted by fnordianslip View Post
Perhaps, or something like it. I didn't put any content in the default conky.conf that was accessible on the status bar, so that's why there's no battery info in it at the moment.
Of yourse you can see the Information on the status bar. But unfortunatly it is not very acurate (with just 8 Bars)

Originally Posted by fnordianslip View Post
The other thing is that I'm not sure the way Jaysire's doing it at the moment is ideal, because that value from lshal doesn't seem to change during charging, and only updates a few seconds after the charger is unplugged. Perhaps some more logic is required in the helper script to determine charging status and report something slightly different through conky.
And Jaysire is using a second script and a temporary file to update the info.

Before finding this thread I thought about a similar solution. I just added
Code:
${color yellow}Battery:$color ${goto 110}${color red}${execi 30 if [ "`hal-device bme |grep "is_charging\|is_discharging" |awk '{print $3;}' |sed -e :a -e '$!N;s/\n/ /;ta'`" = "false true" ]; then  echo "Charging!"; fi}$color${goto 310}${execi 30 hal-device bme |grep "percentage" |awk '{print $3;}'}%${goto 350}${color green}${execibar 30 hal-device bme |grep "percentage" |awk '{print $3;}'} 





.
to my config, just underneath the SWAP-Info.

This displays the string "Charging!" if the battery is being charged (and not just connected to the PC/Power together wit the percentage and a bar. (see screenshot)
The information is updated every 30 sec to save CPU-Cycles.

The only thing I miss is the option "default_bar_size" which is not available in the current build. With this option the bar would be the right size.

Have fun!
Attached Images
 

Last edited by Snafu; 2009-12-30 at 00:23. Reason: removed unnecessary backslash
 

The Following 6 Users Say Thank You to Snafu For This Useful Post: