Fix formatting
This commit is contained in:
parent
3bb3c2d23f
commit
83992d29a0
|
@ -159,9 +159,7 @@ auto waybar::modules::Custom::update() -> void {
|
||||||
parseOutputRaw();
|
parseOutputRaw();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto str = fmt::format(fmt::runtime(format_),
|
auto str = fmt::format(fmt::runtime(format_), fmt::arg("text", text_), fmt::arg("alt", alt_),
|
||||||
fmt::arg("text", text_),
|
|
||||||
fmt::arg("alt", alt_),
|
|
||||||
fmt::arg("icon", getIcon(percentage_, alt_)),
|
fmt::arg("icon", getIcon(percentage_, alt_)),
|
||||||
fmt::arg("percentage", percentage_));
|
fmt::arg("percentage", percentage_));
|
||||||
if ((config_["hide-empty-text"].asBool() && text_.empty()) || str.empty()) {
|
if ((config_["hide-empty-text"].asBool() && text_.empty()) || str.empty()) {
|
||||||
|
@ -171,10 +169,8 @@ auto waybar::modules::Custom::update() -> void {
|
||||||
if (tooltipEnabled()) {
|
if (tooltipEnabled()) {
|
||||||
if (tooltip_format_enabled_) {
|
if (tooltip_format_enabled_) {
|
||||||
auto tooltip = config_["tooltip-format"].asString();
|
auto tooltip = config_["tooltip-format"].asString();
|
||||||
tooltip = fmt::format(fmt::runtime(tooltip),
|
tooltip = fmt::format(fmt::runtime(tooltip), fmt::arg("text", text_),
|
||||||
fmt::arg("text", text_),
|
fmt::arg("alt", alt_), fmt::arg("icon", getIcon(percentage_, alt_)),
|
||||||
fmt::arg("alt", alt_),
|
|
||||||
fmt::arg("icon", getIcon(percentage_, alt_)),
|
|
||||||
fmt::arg("percentage", percentage_));
|
fmt::arg("percentage", percentage_));
|
||||||
label_.set_tooltip_markup(tooltip);
|
label_.set_tooltip_markup(tooltip);
|
||||||
} else if (text_ == tooltip_) {
|
} else if (text_ == tooltip_) {
|
||||||
|
|
Loading…
Reference in New Issue