On Thu, Feb 24, 2005 at 08:45:22AM -0500, Rouben Rostamian wrote in a legally 
binding way:
> Date: Thu, 24 Feb 2005 08:45:22 -0500
> From: Rouben Rostamian <[EMAIL PROTECTED]>
> To: [email protected]
> Cc: Tim Hanson <[EMAIL PROTECTED]>
> Subject: Re: FVWM: Battery state program
> 
> On Thu, Feb 24, 2005 at 04:06:33AM -0800, Tim Hanson wrote:
> > 
> > Does anyone know of a little graphic (Swallowable into FvwmButtons) that
> > keeps track of battery life on a laptop?
> 
> That depends whether APM or ACPI is used for your laptop's
> power management.  I use APM.  There is a very nice utility,
> called asapm, that works with APM.  It has a 48x48 display
> that shows the battery life graphically and numerically.
> I swallow it into FvwmButtons.
> 
> You can get asapm from http://www.tigr.net/afterstep/download/
> 
> Asapm is a part of the Afterstep window manager however it
> works just fine as a stand-alone utility in fvwm.  You don't
> need the rest of Afterstep to compile and run asapm.
> 
> -- 
> Rouben Rostamian

I use a fvwmscript to watch acpi battery level.
I have a small shell script 'bat_level' that just does
"acpi  | sed -e 's/^.*, \([0-9]*\)%.*$/\1%/g'"
to get the % value
This is called by FvwmApplet-ACPI (attached) which just displays this.
Swallow this via
*PanelBar: (2x1 Swallow (Kill) "FvwmApplet-ACPI" "FvwmScript FvwmApplet-ACPI") 

And bobs-your-uncle there it is. Change fonts etc to match your desktop as
needed

Chris

-- 
Is There Life Before Coffee?
WindowTitle {FvwmApplet-ACPI}
WindowSize 64 16                # Taille
#Font           "Shadow=1 1 SE:xft:Seized Future 
A:bold:pixelsize=18:minspace=true"
Font            "Shadow=1 1 SE:xft:ZeroHour:bold:pixelsize=18:minspace=true"

Init
 Begin
  Set $tmp = (GetOutput {exec /usr/local/bin/bat_level} 1 1)
  ChangeTitle 1 $tmp
End

PeriodicTasks
 Begin 
  If (RemainderOfDiv (GetTime) 30)==0 Then
  Begin
    Set $tmp = (GetOutput {exec /usr/local/bin/bat_level} 1 1)
    ChangeTitle  1 $tmp
  End
End

Widget 1
Property
 Position 0 0
 Size 64 16
 Type ItemDraw
 Colorset 3
 Flags NoReliefString
 Title {}
Main
 Case message of
  SingleClic :
  Begin
  End
End

Reply via email to