Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
[Medium impact] The PR appears safe to merge. SummaryThe power panel adds a six-hour charge chart with hover readouts and a plain-bar fallback.
Reviews (9) · Last reviewed commit: "Keep low charge columns at their level w..." · Reviewed by Greptile |
…r it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hovering the power panel's chart draws a hairline and a dot at the pointer and a tooltip above it with the level there and how long ago it was, like "62% · 2h 10m ago". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The chart was laid out once per read, so a panel left open with nothing changing kept a window, and hover times, from when the history was fetched. It now lays the readings out again as the pointer enters the chart. A read queued behind a running one is also dropped when the panel closes instead of starting after it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The queued rerun is deferred, so checking before it was scheduled still let one start if the panel closed in between. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The faint fill under a thin line read as one grey slab, especially on light themes. The chart is now a single area in the bar's fill colour over the same track, 24px tall instead of 32px. Hovering marks the level with a dot on the area's edge and a cut through the area under it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The chart had a fixed 6px radius, so it stayed rounded beside square buttons on a theme with no rounding. It now takes Style.cornerRadius like the panel's buttons, and its track uses the selected fill the agents panel's meters use instead of a fixed alpha. The thin bar shown without history keeps its pill shape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The solid area was heavy on light themes and its slopes looked rough at this size. The chart is now 36 columns over the six hours, each its own slot in the meter track with the theme's corners, filled to the level at the end of its ten minutes, so the last one is the level now. UPower records the level only when it changes, so the chart was never finer. Hovering a column keeps it full while the rest step back, and the tooltip reads that column. The clipping layer and the shape code are gone with the area. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each column's fill stood at least two corner radii tall, about a third of the chart with Hyprland rounding on, so every level below that drew the same. The height follows the level again and a short fill takes a smaller radius instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The power panel shows where the battery is now, but not how it got there, so "how fast am I draining?" means watching the percentage over time. UPower already keeps each battery's charge history on disk; this grows the panel's charge bar into a chart of the last six hours of it.
Style.selectedFillFor), with the theme's corners (Style.cornerRadius, capped at half a column): square cells with Hyprland rounding at 0, pills above it. The thin bar shown without history keeps its pill shape.GetHistorycall when the panel opens, and again when the level or state changes while it is open. No timer, and nothing runs while the panel is closed.62% · 2h 10m ago(nowon the last column). It follows the agents panel's usage meters, which show their numbers in aPanelToolTipon hover, withdelay: 0like the Elsewhen daylight chip, since it's a readout rather than help text. Nothing on it animates, since it follows the pointer. The chart isn't part of the keyboard cursor, which only moves between power profiles, and the hero already shows the level now.The manual's Power entry and the bar README's widget list mention the charge history, and the manual says the chart can be hovered. Four English strings are added for the tooltip.
Overlap. None of the open PRs touching the power panel changes this spot or reads UPower's history. #10377 re-indents the whole panel inside a
ScrollView, so whichever lands second needs a mechanical rebase.Testing
test/shell.d/power-test.sh: the battery's UPower path, restart rows skipped, readings held until the next, the opening level before the window, a window without readings, the live level at the end, the hover readout (the level before and after a step,nowat the end, nothing before the first reading), and the columns (each at the level its stretch ends on, none before the first reading).i18n,motion,power-no-battery,power-present,qml-text-format,panel-open-budgets(power panel: first open 63ms, reopen 54ms) andshell-idle-spawnpass.Captures
Hovering the chart on Tokyo Night, Catppuccin Latte and Gruvbox. The history here is simulated, a drain from 85% to 40% and a charge back to 96%, since the real one on this laptop sits flat at its charge limit:
omarchy-power-chart-demo-panel.mp4
🤖 Generated with Claude Code