The Cygwin-w32 currently supports battery status via the function w32fns.c:Fw32_battery_status. The X11 and nox builds don't have this support, and Cygwin lacks the facilities used on unix-like systems to provide it (/proc/apm, etc.). But it turns out to be easy to compile and use Fw32_battery_status on all Cygwin builds, simply by pulling it out of w32fns.c into a new file. The attached patch does this. OK to push? If so, to which branch? Ken