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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user