From efa7dc7ba49c0479cdbe247049052491b5b0b9ef Mon Sep 17 00:00:00 2001 From: Kiri <56218513+kiriDevs@users.noreply.github.com> Date: Wed, 24 Apr 2024 10:34:35 +0200 Subject: [PATCH] fix(battery): Register health replacement for main format --- src/modules/battery.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/battery.cpp b/src/modules/battery.cpp index 8dae43d5..e9fa3db2 100644 --- a/src/modules/battery.cpp +++ b/src/modules/battery.cpp @@ -714,7 +714,8 @@ auto waybar::modules::Battery::update() -> void { label_.set_markup( fmt::format(fmt::runtime(format), fmt::arg("capacity", capacity), fmt::arg("power", power), fmt::arg("icon", getIcon(capacity, icons)), - fmt::arg("time", time_remaining_formatted), fmt::arg("cycles", cycles))); + fmt::arg("time", time_remaining_formatted), fmt::arg("cycles", cycles), + fmt::arg("health", fmt::format("{:.3}", health)))); } // Call parent update ALabel::update();