From 61d591f5d2d76601816c691138f3aed08d9065d5 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Sat, 11 Jul 2026 18:48:02 +0100 Subject: [PATCH] feat(waybar): explain 'Not charging' hold state in the battery tooltip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With a charge cap, AC-plugged inside the hysteresis band (power.nix: start = cap − 10) reports 'Not charging' — indistinguishable from a broken charger without a hint. tooltip-format-plugged now says the cap is holding the level and how charging resumes. No cap value baked: the menu changes it live without a rebuild. Whole-swap parity: the same tooltip added to all four theme waybar.jsonc files (boreal/executive-slate/summer-day/summer-night) — the generated config is bypassed under these themes. Verified on hardware (TuringMachine, boreal theme, cap 80, battery 71% in the hold band): all four jsonc validate with jq; home-manager switch deploys the boreal config with the tooltip; battery currently in the exact Plugged state the tooltip targets. Co-Authored-By: Claude Fable 5 --- modules/home/waybar.nix | 7 +++++++ themes/boreal/waybar.jsonc | 1 + themes/executive-slate/waybar.jsonc | 1 + themes/summer-day/waybar.jsonc | 1 + themes/summer-night/waybar.jsonc | 1 + 5 files changed, 11 insertions(+) diff --git a/modules/home/waybar.nix b/modules/home/waybar.nix index cedcd56..a8e3249 100644 --- a/modules/home/waybar.nix +++ b/modules/home/waybar.nix @@ -265,6 +265,13 @@ let format = "{icon}{capacity}%"; format-charging = "󰂄 {capacity}%"; format-icons = [ "󰁺 " "󰁼 " "󰁾 " "󰂀 " "󰁹 " ]; + # The kernel's "Not charging" maps to waybar's Plugged state — on a + # machine with a charge cap that's the hold band doing its job + # (power.nix sets start = cap − 10), which reads as "broken charger" + # without an explanation. The cap value isn't baked here: the menu + # can change it live (sysfs + state, no rebuild), so a number would + # go stale. + tooltip-format-plugged = "Plugged in, not charging — held at {capacity}% by the battery charge cap\nCharging resumes ~10% below the cap · click to adjust"; # Click either the battery or the power-profile icon → the combined # power menu (profile + charge cap). The granular System rows stay. on-click = "nomarchy-menu powermgmt"; diff --git a/themes/boreal/waybar.jsonc b/themes/boreal/waybar.jsonc index d38973f..f0e8484 100644 --- a/themes/boreal/waybar.jsonc +++ b/themes/boreal/waybar.jsonc @@ -126,6 +126,7 @@ "format": "{icon}{capacity}%", "format-charging": "{capacity}%", "format-plugged": "{capacity}%", + "tooltip-format-plugged": "Plugged in, not charging — held at {capacity}% by the battery charge cap\nCharging resumes ~10% below the cap · click to adjust", "format-icons": [ " ", " ", diff --git a/themes/executive-slate/waybar.jsonc b/themes/executive-slate/waybar.jsonc index dfdd366..c8507d1 100644 --- a/themes/executive-slate/waybar.jsonc +++ b/themes/executive-slate/waybar.jsonc @@ -118,6 +118,7 @@ "format": "{icon}{capacity}%", "format-charging": "{capacity}%", "format-plugged": "{capacity}%", + "tooltip-format-plugged": "Plugged in, not charging — held at {capacity}% by the battery charge cap\nCharging resumes ~10% below the cap · click to adjust", "format-icons": [ " ", " ", diff --git a/themes/summer-day/waybar.jsonc b/themes/summer-day/waybar.jsonc index f52401f..9f7bc38 100644 --- a/themes/summer-day/waybar.jsonc +++ b/themes/summer-day/waybar.jsonc @@ -82,6 +82,7 @@ "format": "{icon}{capacity}%", "format-charging": "{capacity}%", "format-plugged": "{capacity}%", + "tooltip-format-plugged": "Plugged in, not charging — held at {capacity}% by the battery charge cap\nCharging resumes ~10% below the cap · click to adjust", "format-full": " 100%", "format-icons": [ " ", diff --git a/themes/summer-night/waybar.jsonc b/themes/summer-night/waybar.jsonc index d1d1ff3..44b96cb 100644 --- a/themes/summer-night/waybar.jsonc +++ b/themes/summer-night/waybar.jsonc @@ -82,6 +82,7 @@ "format": "{icon}{capacity}%", "format-charging": "{capacity}%", "format-plugged": "{capacity}%", + "tooltip-format-plugged": "Plugged in, not charging — held at {capacity}% by the battery charge cap\nCharging resumes ~10% below the cap · click to adjust", "format-icons": [ " ", " ",