On Tue, 22 Jul 2003, Joerg Johannes wrote:
> Hi everybody.
>
> I have written a short perl script which reads the battery status of my
> laptop out of /proc/acpi/battery/BAT1/state, to be able to see how much
> time I have left until I have to shutdown or running to the nect power
> jack. I know there exists a kde applet which does this job, but I use
> plain IceWM, so I have to do it myself.
Does IceWM support dockapps? I thought it did.
If so, why not look into:
wmacpi - dockapp that uses acpi to report information
wmapm - dockapp to display apm information, including battery
status - changes color based on battery status, can
be set up to beep and alert via wall
wmbattery - dockapp to display battery status - changes
color based on battery status
xbatt - an x program that can be docked in an wm-app - pretty
primative
Also, if you want the whole shebang:
gkrellm - A rather detailed program that can sit in a dock and
chart a ton of information, including apm.
There is also the file /etc/init.d/apmd, and 'man apmd' if you tend to
have a terminal window open. Try looking at the flags -w, and -W.
The first sets the warning level (on my old laptop's battery, its 50%),
the second uses the wall command to alert all users.
I just downloaded all the dockapps, and from what I can tell, wmapm
seems to be the most featurefilled, but is still pretty primitive.
(This is woody, try 'apt-cache search wm apm',
'apt-cache search wm battery' and 'apt-cache search wm laptop' under
sid and sarge to see what they offer.) They will show you your battery
condition at a glance, and a simple cron job can be set up to alert you
via xmessage for low battery power. Else, use gkrellm, which can be
set up to alert at a specific battery %.
Hope that helps,
Jesse Meyer
--
icq: 34583382 / msn: dasunt@hotmail.com / yim: tsunad
"We are what we pretend to be, so we must be careful about what we
pretend to be." - Kurt Vonnegut Jr : Mother Night
Attachment:
pgp8lMZPjCn9s.pgp
Description: PGP signature