Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasfink1 committed Sep 18, 2024
1 parent 254111f commit a3e7031
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/modules/custom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ auto waybar::modules::Custom::update() -> void {
if (tooltipEnabled()) {
if (tooltip_format_enabled_) {
auto tooltip = config_["tooltip-format"].asString();
tooltip = fmt::format(fmt::runtime(tooltip), fmt::arg("text", text_),
fmt::arg("alt", alt_), fmt::arg("icon", getIcon(percentage_, alt_)),
fmt::arg("percentage", percentage_));
tooltip = fmt::format(
fmt::runtime(tooltip), fmt::arg("text", text_), fmt::arg("alt", alt_),
fmt::arg("icon", getIcon(percentage_, alt_)), fmt::arg("percentage", percentage_));
label_.set_tooltip_markup(tooltip);
} else if (text_ == tooltip_) {
if (label_.get_tooltip_markup() != str) {
Expand Down Expand Up @@ -202,8 +202,9 @@ auto waybar::modules::Custom::update() -> void {
if (std::strcmp(e.what(), "cannot switch from manual to automatic argument indexing") != 0)
throw;

throw fmt::format_error("mixing manual and automatic argument indexing is no longer supported; "
"try replacing \"{}\" with \"{text}\" in your format specifier");
throw fmt::format_error(
"mixing manual and automatic argument indexing is no longer supported; "
"try replacing \"{}\" with \"{text}\" in your format specifier");
}
}
// Call parent update
Expand Down

0 comments on commit a3e7031

Please sign in to comment.