Skip to content

Draft: applets/battery: show icon indicating performance mode/power save mode/inhibition


Indicate non-default power mode or sleep blocking with an icon for the applet:

    • When discharging, show this as an overlay to the battery icon.
    • When no batteries or plugged in, use the status icon as the applet icon (previously: without batteries present there was no indication of power mode at all.)
    • When discharging, show the overlay, but only when there is not already a percentage overlay as it otherwise won't fit (previously: while unplugged there was no power mode status indication shown at all).
    • When plugged in or no batteries, show the battery icon and status overlay as well (previously: the plugged battery icon would be replaced with a large version of the status icon).
  • The icon is set no matter if the power mode/inhibition was invoked manually or requested by some application, and covers the case of inhibitions too (previously: the status indication only fired for profile holds, and also did not indicate inhibitions).

How to test:
In the battery applet, toggle sleep blocking.

Draft because:

  • The overlay symbol is poorly visible; not sure how to improve this without making it large so that it ends up covering most of the battery icon. The current implementation is taken from Maybe an overlay just doesn't work here and we should do with improving the conditions for replacing the battery icon with status icon instead?
  • I couldn't find a good icon for "sleep blocked"; currently I use the speedometer ("speedometer") since the lighting symbol ("battery-profile-performance") is already used for performance mode, but "speedometer" is also already used for balanced power mode.

BUG: 471369

Edited by Natalie Clarius

Merge request reports