[GH-ISSUE #935] Improve upower (battery) icon handling #4502

Open
opened 2026-05-23 00:53:56 +01:00 by JakeStanger · 4 comments
Owner

Originally created by @freijon on GitHub (Apr 10, 2025).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/935

The OOTB icon that is displayed with the upower module is not to my liking and looks very out of place with my setup.

Improvement 1

If you really want to provide the icon OOTB, then it should be possible to disable/hide it. Today, I have to use CSS where it seems I can only set opacity: 0; in combination with the setting icon_size = 0 which uses the smallest icon possible and which hides it but the space is still occupied by the transparent icon.

Improvement 2

I think it would be more consistent with other modules (e.g. volume) to have different strings for the icon, e.g.

  • icons.battery_100
  • icons.battery_75
  • icons.battery_50
  • icons.battery_25
  • icons.battery_0
Originally created by @freijon on GitHub (Apr 10, 2025). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/935 The OOTB icon that is displayed with the `upower` module is not to my liking and looks very out of place with my setup. # Improvement 1 If you really want to provide the icon OOTB, then it should be possible to disable/hide it. Today, I have to use CSS where it seems I can only set `opacity: 0;` in combination with the setting `icon_size = 0` which uses the smallest icon possible and which hides it but the space is still occupied by the transparent icon. # Improvement 2 I think it would be more consistent with other modules (e.g. [volume](https://github.com/JakeStanger/ironbar/wiki/volume#Configuration)) to have different strings for the icon, e.g. - icons.battery_100 - icons.battery_75 - icons.battery_50 - icons.battery_25 - icons.battery_0
Author
Owner

@freijon commented on GitHub (Apr 10, 2025):

EDIT: Updated improvement 2 with only numerical values

<!-- gh-comment-id:2791797361 --> @freijon commented on GitHub (Apr 10, 2025): EDIT: Updated improvement 2 with only numerical values
Author
Owner

@JakeStanger commented on GitHub (Apr 10, 2025):

This is covered by #511, which is the next issue on my list. Should have something for you soon

<!-- gh-comment-id:2791953434 --> @JakeStanger commented on GitHub (Apr 10, 2025): This is covered by #511, which is the next issue on my list. Should have something for you soon
Author
Owner

@freijon commented on GitHub (Dec 4, 2025):

Now that this is apparently implemented, how would I achieve what I described in the original post?

<!-- gh-comment-id:3610509482 --> @freijon commented on GitHub (Dec 4, 2025): Now that this is apparently implemented, how would I achieve what I described in the original post?
Author
Owner

@JakeStanger commented on GitHub (Dec 7, 2025):

I'm looking and I think this was unfairly closed, and a proper solution still needs to be put in place for this module.

The thresholds property lets you control CSS classes, and the module now uses the proper icon system, which means you can change icons to other image using the top-level icon_overrides option, but this isn't ideal.

See #1272 for tracking the ability to hide the icon too.

<!-- gh-comment-id:3622046665 --> @JakeStanger commented on GitHub (Dec 7, 2025): I'm looking and I think this was unfairly closed, and a proper solution still needs to be put in place for this module. The `thresholds` property lets you control CSS classes, and the module now uses the proper icon system, which means you *can* change icons to other image using the top-level [`icon_overrides`](https://github.com/JakeStanger/ironbar/wiki/configuration-guide#31-top-level-options) option, but this isn't ideal. See #1272 for tracking the ability to hide the icon too.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#4502
No description provided.