fix(battery): gate Full-as-Plugged behind full-at-plugged option, drop debug output

Reporting a full battery on AC as 'Plugged' is now opt-in via the
'full-at-plugged' config option (default false), so existing format-full /
tooltip-format-full setups keep working. Also documents the option.
This commit is contained in:
Alex
2026-07-03 21:40:41 +02:00
parent eff483de1f
commit 31a3d7e1bb
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -706,7 +706,7 @@ auto waybar::modules::Battery::update() -> void {
if (!adapter_.empty()) {
std::ifstream(adapter_ / "online") >> adapter_online;
}
if (status == "Full" && adapter_online) {
if (config_["full-at-plugged"].asBool() && status == "Full" && adapter_online) {
status = "Plugged";
}
auto status_pretty = status;