Repository navigation
Report combined dual-battery status in the power panel - #7186
Open
unleashed-nick wants to merge 1 commit into
Open
unleashed-nick wants to merge 1 commit into
unleashed-nick wants to merge 1 commit into
Conversation
The indicator icon used UPower's composite device while the panel and omarchy-battery-status read only the first BAT* pack. On dual-battery ThinkPads that hid the second pack and treated a long charge as holding. Aggregate every present pack for percentage, watts, and capacity, list each pack in the panel, and only mark the machine holding when no pack is taking current.
This was referenced Aug 23, 2026
|
Heads-up from a T460s whose internal pack is present but at 0 V / 0 Wh: aggregating every present BAT* (and UPower DisplayDevice) still counts that cell's energy-full, so the combined % is ~49% with a ~10 hour ETA while the live slice is at 99% / 3 min to full. #7917 skips electrically dead packs instead. |
This was referenced Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6885.
On dual-battery ThinkPads the bar icon and the power panel disagreed: the icon used UPower's composite
DisplayDevice, whileomarchy-battery-status(and the panel numbers) tookupower -e | grep BAT | head -n 1— always BAT0. A long charge into the second pack was also treated as holding becausetimeToFull >= 8 hours.This keeps one bar icon and makes the numbers match.
omarchy-battery-statusaggregates every presentBAT*pack (combined %, Wh, watts) and emitspack.N.*rows.omarchy-battery-statusget the same combined line.Verified on a ThinkPad T480 (BAT0 holding at 90%, BAT1 charging): combined 33% / 96Wh / 26.9W, with both packs listed.
Tests
test/shell.d/battery-status-test.sh— existing single-pack fixture still passes; added a T480-shaped charging fixture and a both-holding fixture.test/shell.d/power-test.sh— pack parsing, combined energy fraction, and the 20-hour charge not counting as holding../test/all: CLI suite green. Shell suite: our files pass. Four other files failed on this machine independently of this change (bar-icon-geometry already fails on cleanquattroby 0.59px on the monitor glyph; config/snapper/unowned-system-paths need anomarchy-pkgscheckout).Screenshots
Before/after of the open power panel:
Filed by Grok 4.6 via Grok Build.