Repository navigation
fix(battery): show plug icon without battery - #1432
Merged
wash2 merged 3 commits intoJun 29, 2026
Merged
Conversation
willfish
force-pushed
the
BAU-hide-battery-applet-without-battery
branch
from
June 11, 2026 08:34
06bbe5c to
e96357b
Compare
willfish
marked this pull request as ready for review
June 11, 2026 08:35
willfish
force-pushed
the
BAU-hide-battery-applet-without-battery
branch
from
June 14, 2026 09:43
e96357b to
ba30e08
Compare
willfish
force-pushed
the
BAU-hide-battery-applet-without-battery
branch
2 times, most recently
from
June 14, 2026 10:21
38c2b46 to
49eb808
Compare
Contributor
Author
|
@wash2, you look like the best person to sanity-check this area. Do these changes seem suitable for the battery applet behavior, or is there a better direction you would prefer? |
wash2
approved these changes
Jun 16, 2026
Contributor
|
@pop-os/ux just to confirm, is this alright? |
The battery applet stays alive when UPower reports no battery so non-battery controls such as brightness and power profiles remain accessible. The panel view still fell back to a generic battery icon when no brightness control was available, which made desktops without battery hardware show an incoherent battery indicator. Use the existing plugged-into-power symbolic icon as the no-battery fallback instead of hiding the indicator or showing a battery icon. Keep the existing display and keyboard brightness icon priority when those controls are available. Test plan: - Ran cargo fmt --check - Ran cargo check -p cosmic-applet-battery - Ran cargo clippy -p cosmic-applet-battery --all-targets - Ran git diff --check Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: William Fish <william.michael.fish@gmail.com>
willfish
force-pushed
the
BAU-hide-battery-applet-without-battery
branch
from
June 16, 2026 06:47
49eb808 to
fe3e113
Compare
Contributor
Author
|
@jklgrasso would you be able to take a look at this when you have a chance? It has been sitting for a while and already has a maintainer approval, so I would appreciate a review or guidance on what is needed to move it forward. |
maria-komarova
approved these changes
Jun 29, 2026
jklgrasso
approved these changes
Jun 29, 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.
The battery applet previously exited when UPower reported no battery. #1370 changed the no-battery path to keep the applet alive so non-battery controls, including brightness controls and power profiles, remain accessible.
That exposed a follow-up UI problem: when no battery was present and no brightness control was available, the panel indicator fell back to the generic battery icon. On desktops without battery hardware this looked like a stray battery indicator, even though the applet still had useful power controls.
Use the existing
plugged-into-power-symbolicicon as the no-battery fallback instead of showing a battery icon or hiding the applet. Display brightness and keyboard brightness icons still take priority when those controls are available, and battery systems continue to use the battery level icon.Test plan
cargo fmt --checkcargo check -p cosmic-applet-batterycargo clippy -p cosmic-applet-battery --all-targetsgit diff --checkNote: the repo flake currently provides Rust 1.87, while current dependencies require Rust 1.93+. I ran the Rust commands with Fenix latest (
rustc 1.98.0-nightly) inside the repo dev shell, withsystemd.devadded forlibudev.pc.