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