Cross-platform system power status information.
Library that allows you get current power source type (AC, Battery or UPS), warning level (none, <22%, <10min) and remaining minutes. You can also observe changes of power source and remaining time.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.