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 it.

--
mattia

On Wed, 25 Sep 2002 07:28:16 -0700
"Carl B. Constantine" <[EMAIL PROTECTED]> wrote:

> * 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 the BM around it?
> 
> -- 
> 
> __   _   Carl B. Constantine
>/ /  (_)__  __   __  [EMAIL PROTECTED]
>   / /__/ / _ \/ // /\ \/ /  (2.4.18)  http://www.duckwing.ca 
>  //_/_//_/\_ _/ /_/\_\  Debian 3.0
> PGP key available on request
> 
> 
>"Microsoft is not the Borg. The Borg have better tech support."
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 
> 



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 the BM around it?

-- 

__   _   Carl B. Constantine
   / /  (_)__  __   __  [EMAIL PROTECTED]
  / /__/ / _ \/ // /\ \/ /  (2.4.18)  http://www.duckwing.ca 
 //_/_//_/\_ _/ /_/\_\  Debian 3.0
PGP key available on request


   "Microsoft is not the Borg. The Borg have better tech support."



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/info
present: yes
$ grep present /proc/acpi/battery/BAT1/state
present: yes

Well, not quite accurate: when i unplug my AC the battery is recognized.
Battery 2: discharging, 100%, 02:17:58 remaining

But there is a big difference: as acpi ist not querying every second it
doesn't need to care about avoiding unnecessary polling of "info".

Gruss,
Erich Schubert
-- 
erich@(mucl.de|debian.org)--GPG Key ID: 4B3A135C
 A man doesn't know what he knows until he knows what he doesn't know.
Die kürzeste Verbindung zwischen zwei Menschen ist ein Lächeln.
Für jedes Problem gibt es eine Lösung, die einfach, klar und falsch ist.



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 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 state file.
> 
> IMHO a good idea. That should make your version useable on all machines
> that partially worked with the original version.
> 
> Greetings,
> Erich
> 
> -- 
> erich@(mucl.de|debian.org)--GPG Key ID: 4B3A135C
>  A man doesn't know what he knows until he knows what he doesn't know.
> Die kürzeste Verbindung zwischen zwei Menschen ist ein Lächeln.
> Der Wissende weiß, dass er glauben muß.
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 
> 



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 it.

--
mattia

On Wed, 25 Sep 2002 07:28:16 -0700
"Carl B. Constantine" <[EMAIL PROTECTED]> wrote:

> * 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 the BM around it?
> 
> -- 
> 
> __   _   Carl B. Constantine
>/ /  (_)__  __   __  [EMAIL PROTECTED]
>   / /__/ / _ \/ // /\ \/ /  (2.4.18)  http://www.duckwing.ca 
>  //_/_//_/\_ _/ /_/\_\  Debian 3.0
> PGP key available on request
> 
> 
>"Microsoft is not the Borg. The Borg have better tech support."
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 
> 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




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 state file.

IMHO a good idea. That should make your version useable on all machines
that partially worked with the original version.

Greetings,
Erich

-- 
erich@(mucl.de|debian.org)--GPG Key ID: 4B3A135C
 A man doesn't know what he knows until he knows what he doesn't know.
Die kürzeste Verbindung zwischen zwei Menschen ist ein Lächeln.
Der Wissende weiß, dass er glauben muß.



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 I
right?

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 state file.

> Multiple-battery support would be nice; (even if i have only one)
> Any idea how to do battery-change detection?

No. And I don't think the applet is prepared for that yet.
Let's do one thing at a time. ;)
  
-- 
 Vicente Aguilar <[EMAIL PROTECTED]> | http://www.bisente.com



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 the BM around it?

-- 

__   _   Carl B. Constantine
   / /  (_)__  __   __  [EMAIL PROTECTED]
  / /__/ / _ \/ // /\ \/ /  (2.4.18)  http://www.duckwing.ca 
 //_/_//_/\_ _/ /_/\_\  Debian 3.0
PGP key available on request


   "Microsoft is not the Borg. The Borg have better tech support."


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




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/info
present: yes
$ grep present /proc/acpi/battery/BAT1/state
present: yes

Well, not quite accurate: when i unplug my AC the battery is recognized.
Battery 2: discharging, 100%, 02:17:58 remaining

But there is a big difference: as acpi ist not querying every second it
doesn't need to care about avoiding unnecessary polling of "info".

Gruss,
Erich Schubert
-- 
erich@(mucl.de|debian.org)--GPG Key ID: 4B3A135C
 A man doesn't know what he knows until he knows what he doesn't know.
Die kürzeste Verbindung zwischen zwei Menschen ist ein Lächeln.
Für jedes Problem gibt es eine Lösung, die einfach, klar und falsch ist.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




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) :-(
Multiple-battery support would be nice; (even if i have only one)
Any idea how to do battery-change detection?

> If enough people test it and find it works in their system, I'll submit
> the patch to the applet author.

I already posted the debian-laptop archive URL to the corresponding bugs
in gnome bugzilla. It certainly is an improvement to the current way
they are doing this.

Greetings,
Erich

-- 
erich@(mucl.de|debian.org)--GPG Key ID: 4B3A135C
A polar bear is a rectangular bear after a coordinate transform.
Liebe ist eine schwere Geisteskrankheit (Platon)
Der Wissende weiß, dass er glauben muß.



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 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 state file.
> 
> IMHO a good idea. That should make your version useable on all machines
> that partially worked with the original version.
> 
> Greetings,
> Erich
> 
> -- 
> erich@(mucl.de|debian.org)--GPG Key ID: 4B3A135C
>  A man doesn't know what he knows until he knows what he doesn't know.
> Die kürzeste Verbindung zwischen zwei Menschen ist ein Lächeln.
> Der Wissende weiß, dass er glauben muß.
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 
> 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




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 state file.

IMHO a good idea. That should make your version useable on all machines
that partially worked with the original version.

Greetings,
Erich

-- 
erich@(mucl.de|debian.org)--GPG Key ID: 4B3A135C
 A man doesn't know what he knows until he knows what he doesn't know.
Die kürzeste Verbindung zwischen zwei Menschen ist ein Lächeln.
Der Wissende weiß, dass er glauben muß.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




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 I
right?

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 state file.

> Multiple-battery support would be nice; (even if i have only one)
> Any idea how to do battery-change detection?

No. And I don't think the applet is prepared for that yet.
Let's do one thing at a time. ;)
  
-- 
 Vicente Aguilar <[EMAIL PROTECTED]> | http://www.bisente.com


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




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) :-(
Multiple-battery support would be nice; (even if i have only one)
Any idea how to do battery-change detection?

> If enough people test it and find it works in their system, I'll submit
> the patch to the applet author.

I already posted the debian-laptop archive URL to the corresponding bugs
in gnome bugzilla. It certainly is an improvement to the current way
they are doing this.

Greetings,
Erich

-- 
erich@(mucl.de|debian.org)--GPG Key ID: 4B3A135C
A polar bear is a rectangular bear after a coordinate transform.
Liebe ist eine schwere Geisteskrankheit (Platon)
Der Wissende weiß, dass er glauben muß.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]