Merge pull request #1084 from gabegorelick/battery-discharging-full

[modules/battery] allow format-discharging-full
This commit is contained in:
Alex 2021-04-26 09:28:00 +02:00 committed by GitHub
commit ef38061edd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -216,7 +216,7 @@ const std::tuple<uint8_t, float, std::string, float> 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";