Ken Brown
2018-01-10 20:17:49 UTC
On most platforms Emacs is able to display battery status on its mode
line. I'd like to try to implement this on Cygwin, but I could use some
pointers on how to get started and what method would be preferred.
Emacs uses /proc/apm, /proc/acpi/battery, or /sys/class/power_supply/ on
Linux; /usr/sbin/apm on BSD; pmset on macOS; and GetSystemPowerStatus on
Windows.
What would be the preferred approach on Cygwin? Based on absolutely no
knowledge, my instinct would be to use GetSystemPowerStatus to populate
a suitable file in /proc and/or to write a utility (usr/sbin/apm.exe).
But I have no specific ideas beyond that.
Ken
line. I'd like to try to implement this on Cygwin, but I could use some
pointers on how to get started and what method would be preferred.
Emacs uses /proc/apm, /proc/acpi/battery, or /sys/class/power_supply/ on
Linux; /usr/sbin/apm on BSD; pmset on macOS; and GetSystemPowerStatus on
Windows.
What would be the preferred approach on Cygwin? Based on absolutely no
knowledge, my instinct would be to use GetSystemPowerStatus to populate
a suitable file in /proc and/or to write a utility (usr/sbin/apm.exe).
But I have no specific ideas beyond that.
Ken