Skip to content

Commit

Permalink
Merge pull request #2412 from jpalus/simpleclock-fmt-compile-fix
Browse files Browse the repository at this point in the history
Fix simpleclock module compilation with recent fmt
  • Loading branch information
Alexays committed Aug 16, 2023
2 parents e30fba0 + abd7a0c commit aecd807
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/simpleclock.cpp
Expand Up @@ -18,13 +18,13 @@ auto waybar::modules::Clock::update() -> void {
tzset(); // Update timezone information
auto now = std::chrono::system_clock::now();
auto localtime = fmt::localtime(std::chrono::system_clock::to_time_t(now));
auto text = fmt::format(format_, localtime);
auto text = fmt::format(fmt::runtime(format_), localtime);
label_.set_markup(text);

if (tooltipEnabled()) {
if (config_["tooltip-format"].isString()) {
auto tooltip_format = config_["tooltip-format"].asString();
auto tooltip_text = fmt::format(tooltip_format, localtime);
auto tooltip_text = fmt::format(fmt::runtime(tooltip_format), localtime);
label_.set_tooltip_text(tooltip_text);
} else {
label_.set_tooltip_text(text);
Expand Down

0 comments on commit aecd807

Please sign in to comment.