Make the battery full-at go to 100%

full-at was capped at the value instead of allowing the battery to show
100% when you were at the full-at value. Uncapping makes more sense as
it makes the full-at value the new 100% and the scale goes down from
there. Whereas before the battery would stay at the full-at value until
it went down enough which is unrealistic.
This commit is contained in:
Pedro Côrte-Real
2020-11-27 10:55:27 +00:00
parent f45d582957
commit 908fa2c6c2
2 changed files with 1 additions and 4 deletions

View File

@ -127,9 +127,6 @@ const std::tuple<uint8_t, float, std::string> 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) {