Skip navigation.
Home

Lithium

Summary: 
a Battery Status Monitor Applet
Current stable version: 
006
Primary author(s): 
Ken Hayber, (based on work by Rds and Tilo Riemer)

Lithium is a Panel Applet that displays an icon indicating the Charge/Discharge status of your laptop's battery. Status information is also displayed in a tooltip. Lithium will use libnotify for the power-level warnings if you have it installed (with python support).

Lithium is a rework of the Baroque applet written by Rds and Tilo Riemer. It is functionally almost the same as Baroque, but the UI has changed quite a lot.

Lithium also includes acpi.py and apm.py that are used by Baroque instead of requiring them to be downloaded separately. In addition, pmu.py was added to support PowerMac users (Me).

Hi Im running ACPI on my

Hi

Im running ACPI on my laptop but when I drag Lithium to the panel when running on the battery it quits with a Divsion by Zero error

stack trace:-
acpi.py (line 524) estimated_life_time time=totalCapacity / totalRate

Varibles:- time =0 , totalCapacity = 3960, totalRate = 0

Thanks

swanny

Strange. That shouldn't be

Strange. That shouldn't be possible (I assume you're on AC so discharge rate is zero). However in the interest of stability, I'll add a check for non-zero totalRate.

You can patch this easily enough:

if totalRate:
  time = totalCapacity / totalRate
else:
  time = totalCapacity
  #according to the comments this has 
  # no real meaning when charging.

Hummm. Realised the reason

Hummm. Realised the reason for the above 'Divide by Zero error'
-Looking in /proc/acpi/battery/BAT1/state when running on battery the discharge rate is reported as zero !!!

Thus not lithiums fault!!! :-D

After applying the above patch the remaining time reported by lithium is now the remaining capacity in mA reported again in /acpi/battery/BAT1/state

Woops didnt read your patch

Woops didnt read your patch, I now understand why the time remaing = remaining capacity :-S

LOL

Lithium

When I drag the icon to the panel I simply get "Applet quit without ever creating a widget!" and no explanation. Any ideas?

Syndicate content