Skip to content

Commit

Permalink
Merge pull request Alexays#3457 from RobertMueller2/issue_3414
Browse files Browse the repository at this point in the history
Issue Alexays#3414/clock: Shift ONLY calendar
  • Loading branch information
Alexays authored Jul 22, 2024
2 parents cece04e + ee0912a commit 003dd3a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/modules/clock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,16 @@ auto waybar::modules::Clock::update() -> void {
// std::vformat doesn't support named arguments.
m_tlpText_ =
std::regex_replace(m_tlpFmt_, std::regex("\\{" + kTZPlaceholder + "\\}"), tzText_);
m_tlpText_ =
std::regex_replace(m_tlpText_, std::regex("\\{" + kCldPlaceholder + "\\}"), cldText_);
m_tlpText_ = std::regex_replace(
m_tlpText_, std::regex("\\{" + kCldPlaceholder + "\\}"),
fmt_lib::vformat(m_locale_, cldText_, fmt_lib::make_format_args(shiftedNow)));
m_tlpText_ =
std::regex_replace(m_tlpText_, std::regex("\\{" + kOrdPlaceholder + "\\}"), ordText_);
} else {
m_tlpText_ = m_tlpFmt_;
}

m_tlpText_ = fmt_lib::vformat(m_locale_, m_tlpText_, fmt_lib::make_format_args(shiftedNow));
m_tlpText_ = fmt_lib::vformat(m_locale_, m_tlpText_, fmt_lib::make_format_args(now));
m_tooltip_->set_markup(m_tlpText_);
label_.trigger_tooltip_query();
}
Expand Down

0 comments on commit 003dd3a

Please sign in to comment.