Implement "Low Power enabled" watch
GLib should have a way to monitor power-profiles-daemon's status to inform applications that they should try and use less memory. This would be similar in concept to GMemoryMonitor
, requiring both a portal'ed and non-portal'ed version to monitor this state.
Prior art:
- Apple's isLowPowerModeEnabled
This functionality was also discussed in https://gitlab.freedesktop.org/upower/upower/-/issues/102
How would you prefer the implementation to be done? If we had a "power" monitor, I think API users would expect it to offer an API similar to UPower's library. Maybe a single boolean property on GApplication
would be best?