Repository navigation
Conversation
|
I spent additional time getting a toggle to control battery charge level (from 80% to 100%) and hold:
If there is interest in pushing this upstream for a PR review, I can do that as well but I won't do it with this PR since the battery charge level toggle was a bit more involved. I opened #10431 for it, and there is a longer standing request at #627 that has been open for over a year. |
|
Heads up from the review on #10384: the If #10384 lands first I'll rebase and point those two lines at |
The panel's one capacity row is labelled "Battery size" and filled with UPower's energy-full, which is what the pack charges to today rather than what it was sold as. A worn battery therefore reads far below the number on its label with nothing on the panel to explain the gap, and the figure a user would act on - how much capacity is left to lose - is absent. omarchy-battery-status --shell now also emits energy-full-design as `design` and UPower's own capacity as `health`. "Battery size" carries the nameplate figure, "Current capacity" is added beside it, and a BATTERY HEALTH section carries the percentage, a bar, the cycle count and a verdict: Great, Normal, Worn or Bad. 80% divides Normal from Worn, being the line most vendors treat as still serviceable and where capacity warranties usually stop; 70% divides Worn from Bad, a third of the pack gone and the band where fade tends to accelerate. A pack whose firmware omits the design figure yields neither key, and both are gated on the pair, so the panel falls back to exactly what it renders today instead of showing a fabricated 100%.
23468d2 to
d061fe3
Compare
|
I saw the overlap being mapped out over on #10392 and wanted to mention where this one fits, since it isn't on that list. This PR doesn't touch how the battery gets picked or how the rate is calculated. It just adds two values to One thing I checked in case #10392 goes in first: on machines with more than one battery it points It's still mergeable against I also noticed #8579 adds battery health to the power panel too and touches three of the same files, along with a charge limit. If you'd rather go with one of them, I'm fine either way and can rebase on top of whichever one lands. |
|
I really want your approach to work. I myself am trying to find a way to limit my charging. Could you please give me some update about your current progress ? If this gets integrated with omarchy or exists as a plugin that would be great. |
Hey thanks for the interest! The battery-health PR is awaiting review and needs updating against current upstream; the charge-cap integration is implemented locally, but hasn’t been submitted as a PR or packaged publicly. I'm working on resolving the conflicts in the meantime. |
[Medium impact] The PR appears safe to merge; no new actionable issues were found. SummaryAdds design capacity, battery health, and condition advice to the power panel.
Reviews (8) · Last reviewed commit: "battery-health-in-power-panel: Set the a..." · Reviewed by Greptile |
Panel.qml keeps the scrollable column from this branch and takes quattro's Style.duration timing for the charging pulse. The battery status test keeps the design capacity and health checks beside quattro's status-line, full-battery and sparse-reading cases. The power test keeps the Model.js health checks and the VM-run profile scroll check, and drops the Panel.qml source-text asserts in line with omacom#16334, as does the battery status test's rg check.
|
Merged the latest quattro in and fixed the conflicts. The panel works the same, it just picks up the new Style.duration timings. I also dropped the Panel.qml source-text asserts from the tests to match #16334. The Model.js and battery status tests are still there, and the shell suite passes. |
|
I reworked this into a much smaller change, so the earlier screenshots in this thread no longer show what the PR does. The description has the current before and after. The separate Battery Health section, the bar and the scroll wrapper are gone. The panel now keeps every stock row where it is and adds two rows below:
When the firmware reports no design figure, the panel renders exactly as it does today. The diff is about 100 added lines across 7 files, and it is merged up to current quattro. It does not touch charge limits, so it should not get in the way of #13205 or #19061. Before:
After:
Both are from my ThinkPad P52 with a new pack, so size and capacity match and health reads 100%. |
|
Closing as superseded by #20379, which added battery health to the power panel. |




What changes
The power panel shows one capacity row, labelled "Battery size", filled with UPower's
energy-full. That is what the pack charges to today, not what it was sold as. On a worn battery the two are far apart and nothing on the panel explains the gap: my old pack read 64Wh in the panel against 90Wh on its label.omarchy-battery-status --shellgains two keys, both already in theupower -ioutput it parses:The stats grid gains two rows. Nothing that is there today moves:
energy-full)80% is the line most vendors treat as a pack still being serviceable, and where capacity warranties tend to stop. 70% is more of a judgement call: a third of the pack is gone by then. The wording and the thresholds live in one small function, and the Condition row is its own commit, so it is easy to adjust or drop without touching the rest.
The manual's top bar chapter gains a short "Battery health" section with the same table.
When the firmware reports no design figure (or no health figure), the script prints neither key and the panel renders exactly as it does today.
This is a much smaller version of what this PR first proposed. The separate Battery Health section, the bar and the scroll wrapper are gone, so the change is now about 100 added lines across 7 files, with 11 English strings.
Notes:
UPower.displayDevicecannot supply this. It is a composite device and UPower populates neitherenergy-full-designnorcapacityon it, so the figures come fromupower -ion the real battery, the same callsizeandpercentagealready come from.capacity:match is anchored. Unanchored it also matchescapacity-level:, whose value is a word, which would read as 0% health.Verification
test/shell.d/battery-status-test.shcovers both new keys, the rounding, thecapacity-leveltrap, and a pack with no design figure printing neither key. The new assertions fail againstquattro's script.power-test.shcovers the verdict at each threshold and that the advice is translated by tier.battery-status-test.sh,power-test.sh,i18n-test.shandqml-text-format-test.shpass. I did not run the full./test/allfor this revision.Screenshots
Earlier comments below show previous layouts. These captures show the current one.
BEFORE (Stock)
AFTER (with the new changes)
THE FOUR CONDITIONS (Great and Worn on top, Normal and Bad below; all but Great are simulated readings)