batalert: a /dev/apm monitor and program launcher

About

batalert is a simple battery monitory for
OpenBSD that monitors /dev/apm
and, when the estimated battery life remaining (measured in minutes) drops
below a specified threshold (and the AC is disconnected), it launches a
program. That's it.

Although something similar could be accomplished with
sensorsd(8),
I wanted something I could drop on other, non-OpenBSD computers, that
could be as annoying as possible (I tend to require this... otherwise my
battery runs dry and my laptop shuts off). It queries the standard
APM interface for battery info, and thus compiles & runs fine on
most POSIX complient OS's.