Automatic time information in battery display

Gautam Iyer <[email protected]>
Newsgroups gmane.comp.gnome.apps.gkrellm
Message-ID <[email protected]>
Hi All,

I just noticed that if I do

    acpi -V

from my shell, I get a display of the following form:

    
     Battery 1: discharging, 56%, 02:33:52 remaining
     Thermal 1: ok, 16.0 degrees C
     Thermal 2: ok, 42.0 degrees C
     Thermal 3: ok, 36.0 degrees C
     Thermal 4: ok, 33.0 degrees C
  AC Adapter 1: off-line

Note the friendly "02:33:52 remaining" prompt. Any chance we can get
this time indicator in Gkrellm? As things stand, to do this in Gkrellm2,
I need to put in the total time of my battery. I generally don't know
this, and I *certainly* haven't told acpi what this is.

In case it helps, catting the appropriate files in /proc gives

    $ cat /proc/acpi/battery/C23D/state
    present:                 yes
    capacity state:          ok
    charging state:          discharging
    present rate:            760 mA
    remaining capacity:      2071 mAh
    present voltage:         11321 mV

Perhaps "acpi -V" uses the "present rate" field to guess this. Would be
neat if Gkrellm2 could do that.

Of course, Gkrellm2 could do a better job than "acpi -V". Since Gkrellm2
polls the battery every so often, it could compute the above figure
based on some averaged rate, instead of just the current discharging
rate.

Also one could guess this in case the present rate field is not present.
If one assumes some sort of exponential discharging curve, all one needs
(theoretically) to determine the discharge time would be two
measurements of the battery capacity at known times.

Just a thought. Even if this feature is not added, I'm still going to
use Gkrellm2 till I die ;).

GI

-- 
Twenty Ways To Maintain A Healthy Level of Insanity
19. Tell your children over dinner. "Due to the economy, we are going to
have to let one of you go."

______________________________________________
Gkrellm mailing list
[email protected]
Read archives-join-leave-set RSS feed:
http://archive.lists.netservicesgroup.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.