applets/battery: add support for blocking inhibitions, and unify layout for automatic and manual inhibitions
Add buttons in the inhibition hint using PowerDevil's new DBus interface to release and optionally permanently block inhibitions posted by apps.
Adopt the same layout in the manual inhibition control.
Before: | After: |
---|---|
Motivation:
(1): see bug report
(2): This makes the UI less visually busy and puts more focus on the probably more interesting app inhibitions.
How to test:
- Build this together with the associated powerdevil MR
- Restart powerdevil:
systemctl --user restart plasma-powerdevil.service
and the Plasma applet - Play a video and wait five seconds for the inhibition to appear
- Press the button
- Confirm computer automatically goes to sleep after the inactivity period set in power management settings even while video is still playing
- Confirm that the "every time" option will also take effect when you repeat the same steps again, and the "only this time" option will not
- Confirm the applet shows you a message informing about this, and that the "Block" button undoes it as expected
Depends on backend: powerdevil!363 (merged)
Edited by Natalie Clarius