From 00c11c64cab5cb583769917cf57e5ff56a65973f Mon Sep 17 00:00:00 2001 From: Daan Goossens Date: Sat, 28 May 2022 12:33:47 +0200 Subject: [PATCH] fix(bluetooth): tooltip-format-connected-battery --- src/modules/bluetooth.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/bluetooth.cpp b/src/modules/bluetooth.cpp index 4c77eb22..cff4a876 100644 --- a/src/modules/bluetooth.cpp +++ b/src/modules/bluetooth.cpp @@ -165,7 +165,9 @@ auto waybar::modules::Bluetooth::update() -> void { format_ = default_format_; } } - if (config_["tooltip-format-" + state].isString()) { + if (battery_available && config_["tooltip-format-connected-battery"].isString()) { + tooltip_format = config_["tooltip-format-connected-battery"].asString(); + } else if (config_["tooltip-format-" + state].isString()) { tooltip_format = config_["tooltip-format-" + state].asString(); } else if (config_["tooltip-format"].isString()) { tooltip_format = config_["tooltip-format"].asString();