User Feedback :: Battery power monitor on desktop



From .torsmorc
Quote
${color #ddd}Battery:  $color ${battery}


So it is displaying the percentage represented by {battery}
Is there any code for how {battery} gets the percentage figure, a script or something ? If so where can I read it. I'm looking for how it actually calculates or finds the percentage remaining. Thanks.

I would guess it is getting this by calculation from a combination of:

/proc/acpi/battery/BAT0/info
and
/proc/acpi/battery/BAT0/state

On my laptop, in terminal :
Quote
cat /proc/acpi/battery

gives cannot open file - no such file or directory
so I think mine is using apm, where would it calculate it from with apm ?

If your laptop uses apm, sorry - I have no idea.

In case your laptop uses acpi, is it disabled by a boot code? Is the battery module loaded?

When DSL boots up it says in Blue
Quote
Skipping APM bios detection as requested on boot command line


Boot command is
Quote
kernel /boot/linux24 root=/dev/hda3 quiet vga=788 noacpi noapm nodma nosci frugal
initrd /boot/minirt24.gz

Next Page...
original here.