On Sat, Mar 17, 2007 at 09:50:37AM +0000, A.S. Bradbury wrote:
> >
> >export CAPACITY=`awk '/last/ { sum += $4 } END { print sum }'
> >/proc/acpi/battery/BAT*/info`
> >while true
> >do
> > echo `awk '/remaining/ { sum += $3 } END { print int (sum * 100 /
> > ENVIRON["CAPACITY"] + .5) "%" }' /proc/acpi/battery/BAT*/state`
> > `/bin/date '+%x %H:%M:%S'` `uptime | sed 's/.*://; s/,//g'`
> > sleep 1
> >done | dwm
> >
> This code doesn't work for if the battery is not present. It would
sure, but in that case it simply shows nothing. and if there is no
battery then you dont need to know any capacity, do you? ;)
> also seem useful to represent whether the battery is charging,
> discharging or at full capacity by prepending the percentage with ^, v
> or =, but this is personal taste. I was just about to set up this sort
good idea but that i can see by looking at the power cable being plugged
in or not ;)
> of output, planning to just take the ruby battery info parsing code
> from Mauricio Fernandez's wmii-ruby.
where is that code?
let me repeat my intention: i want to as simple and as resource saving
as possible have a little info on my desktop about the power state of my
notebook' batteries.
tube
-- tube_AT_count0.net http://count0.netReceived on Sat Mar 17 2007 - 11:32:03 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:39:26 UTC