From 7e13e26c29f2e7090d3d92a7016a0cf2b2af6746 Mon Sep 17 00:00:00 2001 From: Gabe Gorelick Date: Sun, 25 Apr 2021 22:00:24 -0400 Subject: [PATCH] [modules/battery] allow format-discharging-full `format-discharging-full` has been impossible since #923 made it impossible to be full and discharging at the same time. This should fix that by only making `format-charging-full` impossible. Whether or not that should be allowed is a good question, but beyond the scope of this change. Fixes #1031 --- src/modules/battery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/battery.cpp b/src/modules/battery.cpp index 49e23dec..e598858b 100644 --- a/src/modules/battery.cpp +++ b/src/modules/battery.cpp @@ -216,7 +216,7 @@ const std::tuple waybar::modules::Battery::g capacity = 100.f; } uint8_t cap = round(capacity); - if (cap == 100) { + if (cap == 100 && status == "Charging") { // If we've reached 100% just mark as full as some batteries can stay // stuck reporting they're still charging but not yet done status = "Full";