From: Steffen B. <sb...@mi...> - 2001-12-29 15:36:01
|
> > Grab the source for the gnome battery applet. It handles > > both APM and ACPI. Bonus points for converting it to a shared lib > > that every other app that wants this info can use. > >Fix libgtop to do ACPI as well and it'll give you a common library that also >works on BSD and Solaris I got the version 1.4.0.4 GNOME applets, and the corresponding battery applet reads only /proc/apm directly. I found a patch that teaches it to do ACPI, but this patch works by parsing the output of /proc/acpi, and I hoped that there would be a more elegant way (e.g. one that works on a binary level instead of the level of strings). I also got version 1.0.7 of libgtop, and I haven't found any reference to querying the battery status, only to the parameters needed by the top utility (i.e., amount of free and used memory, processor utilization, processes and so on). Is there a newer version available somewhere that defines an interface for querying the battery status? Regards, Steffen |