From d45ce841e3fb6aad6cd803a159aef4f94c57ca0e Mon Sep 17 00:00:00 2001 From: guttermonk Date: Sat, 6 Sep 2025 08:40:09 -0500 Subject: [PATCH] Keep the local timezone from being in the tooltip. --- src/modules/clock.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/clock.cpp b/src/modules/clock.cpp index ddd4c887..928fcc6c 100644 --- a/src/modules/clock.cpp +++ b/src/modules/clock.cpp @@ -191,10 +191,13 @@ auto waybar::modules::Clock::getTZtext(sys_seconds now) -> std::string { std::stringstream os; bool first = true; for (size_t tz_idx{0}; tz_idx < tzList_.size(); ++tz_idx) { + // Skip local timezone (nullptr) - never show it in tooltip + if (tzList_[tz_idx] == nullptr) continue; + // Skip current timezone unless timezone-tooltip-format is specified if (static_cast(tz_idx) == tzCurrIdx_ && tzTooltipFormat_.empty()) continue; - const auto* tz = tzList_[tz_idx] != nullptr ? tzList_[tz_idx] : local_zone(); + const auto* tz = tzList_[tz_idx]; auto zt{zoned_time{tz, now}}; // Add newline before each entry except the first