[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Laptop battery



I cannot rememeber the format of the apmd command or the output of the
command, but basically you use 'cut' to snip out the xx% part.
Probably there is neat regexp you could also use.

For the prompt bit, have a read here
http://www.linux.org/docs/ldp/howto/Bash-Prompt-HOWTO/x293.html

I really was very happy with it though.

Matt


--


> -----Original Message-----
> From: Steven Schlansker [mailto:steven@fgsoft.net] 
> Sent: Wednesday, 1 October 2003 12:02 PM
> To: debian-user@lists.debian.org
> Subject: Re: Laptop battery
> 
> 
> Cool, apm works fine.  How can I get it to go in my prompt?
> 
> On Monday, September 29, 2003, at 11:41  PM, Joyce, Matthew wrote:
> 
> >
> > I used to use apmd, it worked pretty well, I used to cut the power
> > left %
> > out and use it in my prompt.
> >
> > hub:~# apt-cache show  apmd
> > Package: apmd
> > Priority: optional
> > Section: admin
> > Installed-Size: 220
> > Maintainer: Avery Pennarun <apenwarr@debian.org>
> > Architecture: i386
> > Version: 3.0.2-1.19
> > Depends: libapm1 (>= 3.0.2-1.11), libc6 (>= 2.2.4-4), debconf, 
> > powermgmt-base
> > Suggests: xapm
> > Filename: pool/main/a/apmd/apmd_3.0.2-1.19_i386.deb
> > Size: 44632
> > MD5sum: b274295bddfbb119231700c05a2ee7ca
> > Description: Utilities for Advanced Power Management (APM)
> >  On laptop computers, the Advanced Power Management (APM) support  
> > provides access to battery status information and may help you to  
> > conserve battery power, depending on your laptop and the APM  
> > implementation.  The apmd program also lets you run 
> arbitrary programs  
> > when APM events happen (for example, you can eject PCMCIA 
> devices when  
> > you suspend, or change hard drive timeouts when you connect the 
> > battery).  .
> >  This package contains apmd(8), a daemon for logging and 
> acting on APM
> >  events; and apm(1), a client that prints the information 
> in /proc/apm
> >  in a readable format.
> >  .
> >  apmd is notified of APM events by the APM driver in the kernel.
> >  .
> >  Recent Debian kernels are built with APM support but it is disabled
> >  by default.  You need to boot the kernel with the "apm=on" 
> option if
> >  you want to enable the driver. (You may need to add this option to
> >  your lilo command line.)
> > Task: laptop
> >
> >
> >> -----Original Message-----
> >> From: Steven Schlansker [mailto:steven@fgsoft.net]
> >> Sent: Tuesday, 30 September 2003 11:17 AM
> >> To: debian-user@lists.debian.org
> >> Subject: Laptop battery
> >>
> >>
> >> I have an ancient NEC Versa 4080H laptop, and I wiped 
> Windows off of 
> >> it to install Debian.  I'd like to be able to check the power
> >> left in the
> >> battery.  How would I do that?  (Note that there's no X windows
> >> installed, so command line only please)
> >>
> >> Is there a /proc entry?  I couldn't find one.  Thanks for any help.
> >>
> >> Also please CC any replies to me, as I don't want to deal with the 
> >> massive amounts of mail going through this server.  Thanks.
> >>
> >> ------------------
> >>
> >> Microsoft Windows: Proof that P.T. Barnum was correct.
> >>
> >> Steven Schlansker
> >> Tech Support & Programming
> >>
> >> Flamin' Ghost Software
> >> http://www.fgsoft.net/
> >>
> >> steven@fgsoft.net
> >> techsupport@fgsoft.net
> >>
> >>
> >> --
> >> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> >> with a subject of "unsubscribe". Trouble? Contact
> >> listmaster@lists.debian.org
> >>
> >
> >
> >
> >
> >
> ------------------
> 
> Microsoft Windows: Proof that P.T. Barnum was correct.
> 
> Steven Schlansker
> Tech Support & Programming
> 
> Flamin' Ghost Software
> http://www.fgsoft.net/
> 
> steven@fgsoft.net
> techsupport@fgsoft.net
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact 
> listmaster@lists.debian.org
> 




Reply to: