diff --git a/src/modules/battery.cpp b/src/modules/battery.cpp index d2a24457..f9f3084e 100644 --- a/src/modules/battery.cpp +++ b/src/modules/battery.cpp @@ -371,7 +371,7 @@ const std::tuple waybar::mo if (charge_full_exists && charge_full_design_exists) { float bat_health_percent = ((float)charge_full / charge_full_design) * 100; - if (mainBatHealthPercent == 0.0f || bat_health_percent < main_bat_health_percent) { + if (mainBatHealthPercent == 0.0f || bat_health_percent < mainBatHealthPercent) { mainBatHealthPercent = bat_health_percent; } }