mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 06:15:21 +01:00
[GH-ISSUE #1030] better battery icons #5941
Labels
No labels
A:Build
A:CI
A:Client
A:Config
A:Core
A:Documentation
A:Documentation
A:IPC
A:Testing
A:UX/UI
blocked
BREAKING CHANGE
duplicate
good first issue
GTK4
help wanted
invalid
M:Battery
M:Battery
M:Bindmode
M:Bluetooth
M:Brightness
M:Cairo
M:Clipboard
M:Clock
M:Clock
M:Custom
M:Focused
M:Keyboard
M:Launcher
M:Menu
M:Music
M:Music
M:Music
M:Network Manager
M:Notifications
M:SysInfo
M:Tray
M:Volume
M:Workspaces
partially resolved
P:Critical
P:High
P:Low
P:Medium
pull-request
T:Bug
T:Bug
T:Core Enhancement
T:Module Enhancement
T:New Module
T:Question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/ironbar#5941
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Kommynct on GitHub (Jun 6, 2025).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1030
I want to be able to use different icons for upower based on the battery state and whether or not it's charging, on waybar I have this setup with nerdfonts
this gives accurate icons no matter the battery state and percentage combination without a separate icon needed for all possible battery states. This would be nice to have on the upower module.
i think waybars implementation should just be copy-pasted, for icon setup it is perfect in my eyes.
@JakeStanger commented on GitHub (Jun 6, 2025):
Are you able to expand on this please? As you've not filled out the feature request issue template, I'm missing a lot of the information I'd normally ask for. it's not clear what the actual usecase is here, and I'm not interested in blindly copying Waybar.
@Kommynct commented on GitHub (Jun 6, 2025):
Yes, sorry, I often lack clarity.
So, the way it works currently in waybar is that these icons are programatically determined, you write
{icon}
and you get something from the list above, just as an example,
`discharging": ["", "", "", "", "", "", "", "", "", "", "" ],
each icon in the sequence depicts less and less charge, you might be thinking "how does it know what percentage is to what icon" and that's simple, they have to be placed in order, and they evenly take up an equal amount of the storage, so, one could have
discharging": ["", "" ],
and then the icon would change at the 50% mark
This makes it so that you can have a gradual decrease with enough icons, it also makes it so that you can have different icons for different situations, for example,
I want my charging icon to have a lightning bolt to the right of it, but I still want it to take up one monospace character, so, the charging icons are unique
here's a screenshot since github mangles the icons:
full is kind of a silly dummy one, but the rest kind of just make intuitive sense I hope, I hope that helps.
also some of these should be simplified
full is multiple icons because some batteries report full at less than 100%. Charged is a synonym and should be merged with it
plugged means it's not charging but is plugged in and is not at 100% (rare but it covers all cases)
@JakeStanger commented on GitHub (Sep 7, 2025):
Closing as resolved due to #1125 and #1126