Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (3) </ 1 [2] 3 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Battery power monitor on desktop< Next Oldest | Next Newest >
setecio Offline





Group: Members
Posts: 89
Joined: Nov. 2006
Posted: April 12 2007,08:58 QUOTE

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.
Back to top
Profile PM 
Juanito Offline





Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: April 12 2007,09:04 QUOTE

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

/proc/acpi/battery/BAT0/info
and
/proc/acpi/battery/BAT0/state
Back to top
Profile PM 
setecio Offline





Group: Members
Posts: 89
Joined: Nov. 2006
Posted: April 12 2007,09:07 QUOTE

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 ?
Back to top
Profile PM 
Juanito Offline





Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: April 12 2007,09:14 QUOTE

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?
Back to top
Profile PM 
setecio Offline





Group: Members
Posts: 89
Joined: Nov. 2006
Posted: April 12 2007,09:34 QUOTE

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
Back to top
Profile PM 
12 replies since April 11 2007,15:36 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (3) </ 1 [2] 3 >/
reply to topic new topic new poll
Quick Reply: Battery power monitor on desktop

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code