diff --git a/man/waybar-battery.5.scd b/man/waybar-battery.5.scd index 917a03d..c9e6e78 100644 --- a/man/waybar-battery.5.scd +++ b/man/waybar-battery.5.scd @@ -20,7 +20,7 @@ The *battery* module displays the current capacity and state (eg. charging) of y *full-at*: ++ typeof: integer ++ - Define the max percentage of the battery, useful for an old battery, e.g. 96 + Define the max percentage of the battery, for when you've set the battery to stop charging at a lower level to save it. For example, if you've set the battery to stop at 80% that will become the new 100%. *interval*: ++ typeof: integer ++ diff --git a/src/modules/battery.cpp b/src/modules/battery.cpp index 2d55370..031c949 100644 --- a/src/modules/battery.cpp +++ b/src/modules/battery.cpp @@ -127,9 +127,6 @@ const std::tuple waybar::modules::Battery::getInfos auto full_at = config_["full-at"].asUInt(); if (full_at < 100) { capacity = 100.f * capacity / full_at; - if (capacity > full_at) { - capacity = full_at; - } } } if (capacity > 100.f) {