Power Management Module
In order to make CuboCore a proper DE, we need an efficient power management module. The power manager should be able to perform the following tasks:
- Detect AC Power Supply Connect/Disconnect - Notify user
- Check battery charge percentage - Notify user
Change display brightness on idle/battery state/power state
- Reduce brightness to 50% after 5 mins of idle time
- Reduce brightness to 25% when battery is low and 5% when critical
- Reduce brightness to 50% when AC power is disconnected and restore it to 100% when reconnected.
- Predefined and custom actions on change in charge state (suspend to ram @ 10% and disk at 5% and so on...)
- Predefined options for Various states: On Power, On Battery, On Lower Battery and On Critical Battery, etc
- Record the last Battery charged time and percentage.
- Reducing the CPU freq in battery mode.
Also, our tray icon/applet should show the following two options.
- Slider for the user to manually change the brightness
- Option for the user to enable/disable power management
A good reference implementation is KDE's PowerDevil.
PS: PowerWidget's battery icons do not work well with all icon themes. To be specific, they work only with Breeze/Breeze Dark icon themes. One way to fix this is to generate the battery icon dynamically like in DesQ.