Re: ACPI patch for the Gnome2 battery applet

2002-09-25 Thread Mattia Dongili
well, I'm using version 0.5 and it works, i looked at the code and at every execution the directory /proc/acpi is scanned to find out relevant info. my suggestion was meant just to look at the code and maybe rework it a bit to read /proc/acpi only at startup and develop a user interface around i

Re: ACPI patch for the Gnome2 battery applet

2002-09-25 Thread Carl B. Constantine
* Mattia Dongili ([EMAIL PROTECTED]) wrote: > Hi, > take a look at the acpi command line utility > (http://grahame.azale.net/acpi.shtml) it does exactely what you're looking > for, except it misses a UI. > I've been using it since the bm doesn't work. but maybe someone could use his code and wr

Re: ACPI patch for the Gnome2 battery applet

2002-09-25 Thread Erich Schubert
> take a look at the acpi command line utility > (http://grahame.azale.net/acpi.shtml) it does exactely what you're > looking for, except it misses a UI. except it doesn't recoginze my batteries: $ acpi -s Battery 1: slot empty Battery 2: slot empty $ grep present /proc/acpi/battery/BAT1

Re: ACPI patch for the Gnome2 battery applet

2002-09-25 Thread Mattia Dongili
Hi, take a look at the acpi command line utility (http://grahame.azale.net/acpi.shtml) it does exactely what you're looking for, except it misses a UI. -- mattia On Wed, 25 Sep 2002 14:28:35 +0200 Erich Schubert <[EMAIL PROTECTED]> wrote: > > I've been taking a look at battery/BAT0/state in m

Re: ACPI patch for the Gnome2 battery applet

2002-09-25 Thread Mattia Dongili
well, I'm using version 0.5 and it works, i looked at the code and at every execution the directory /proc/acpi is scanned to find out relevant info. my suggestion was meant just to look at the code and maybe rework it a bit to read /proc/acpi only at startup and develop a user interface around

Re: ACPI patch for the Gnome2 battery applet

2002-09-25 Thread Erich Schubert
> I've been taking a look at battery/BAT0/state in my system and the first > line reads: "present: yes". It should be "no" in your empty socket, am I > right? correct. > If that's the case, I can modify the scan routines to use the first > subdir with the correct files AND "present: yes" on the s

Re: ACPI patch for the Gnome2 battery applet

2002-09-25 Thread Vicente Aguilar
El mié, 25-09-2002 a las 13:43, Erich Schubert escribió: > If it only uses the first it will use my empty battery socket (where my > cd writer is in) :-( I've been taking a look at battery/BAT0/state in my system and the first line reads: "present: yes". It should be "no" in your empty socket, am

Re: ACPI patch for the Gnome2 battery applet

2002-09-25 Thread Carl B. Constantine
* Mattia Dongili ([EMAIL PROTECTED]) wrote: > Hi, > take a look at the acpi command line utility (http://grahame.azale.net/acpi.shtml) >it does exactely what you're looking for, except it misses a UI. > I've been using it since the bm doesn't work. but maybe someone could use his code and write

Re: ACPI patch for the Gnome2 battery applet

2002-09-25 Thread Erich Schubert
> take a look at the acpi command line utility > (http://grahame.azale.net/acpi.shtml) it does exactely what you're > looking for, except it misses a UI. except it doesn't recoginze my batteries: $ acpi -s Battery 1: slot empty Battery 2: slot empty $ grep present /proc/acpi/battery/BAT

Re: ACPI patch for the Gnome2 battery applet

2002-09-25 Thread Erich Schubert
> Give it a try. It scans /proc/acpi/battery and ac_adapter looking for a > subdir with the state and info files, and uses the first subdir it > founds with those files. The scan is done only once, and If it only uses the first it will use my empty battery socket (where my cd writer is in) :-( Mul

Re: ACPI patch for the Gnome2 battery applet

2002-09-25 Thread Mattia Dongili
Hi, take a look at the acpi command line utility (http://grahame.azale.net/acpi.shtml) it does exactely what you're looking for, except it misses a UI. -- mattia On Wed, 25 Sep 2002 14:28:35 +0200 Erich Schubert <[EMAIL PROTECTED]> wrote: > > I've been taking a look at battery/BAT0/state in m

ACPI patch for the Gnome2 battery applet

2002-09-25 Thread Vicente Aguilar
Hi I've been following your discussion about the gnome-applets2 battery monitor and the fact that it has hardcoded the ACPI info directories. I didn't like that soulution and have come up with this patch. Give it a try. It scans /proc/acpi/battery and ac_adapter looking for a subdir with the stat

Re: ACPI patch for the Gnome2 battery applet

2002-09-25 Thread Erich Schubert
> I've been taking a look at battery/BAT0/state in my system and the first > line reads: "present: yes". It should be "no" in your empty socket, am I > right? correct. > If that's the case, I can modify the scan routines to use the first > subdir with the correct files AND "present: yes" on the

Re: ACPI patch for the Gnome2 battery applet

2002-09-25 Thread Vicente Aguilar
El mié, 25-09-2002 a las 13:43, Erich Schubert escribió: > If it only uses the first it will use my empty battery socket (where my > cd writer is in) :-( I've been taking a look at battery/BAT0/state in my system and the first line reads: "present: yes". It should be "no" in your empty socket, a

Re: ACPI patch for the Gnome2 battery applet

2002-09-25 Thread Erich Schubert
> Give it a try. It scans /proc/acpi/battery and ac_adapter looking for a > subdir with the state and info files, and uses the first subdir it > founds with those files. The scan is done only once, and If it only uses the first it will use my empty battery socket (where my cd writer is in) :-( Mu

ACPI patch for the Gnome2 battery applet

2002-09-25 Thread Vicente Aguilar
Hi I've been following your discussion about the gnome-applets2 battery monitor and the fact that it has hardcoded the ACPI info directories. I didn't like that soulution and have come up with this patch. Give it a try. It scans /proc/acpi/battery and ac_adapter looking for a subdir with the sta