From c885be369e4f2a822b1e3635b8cdca098c50f113 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 30 Dec 2019 13:44:06 +0100 Subject: [PATCH] feat(Network): hide on empty format --- src/modules/network.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/network.cpp b/src/modules/network.cpp index ba196cff..a332d5a2 100644 --- a/src/modules/network.cpp +++ b/src/modules/network.cpp @@ -280,6 +280,11 @@ auto waybar::modules::Network::update() -> void { fmt::arg("bandwidthUpOctets", pow_format(bandwidth_up / interval_.count(), "o/s"))); if (text != label_.get_label()) { label_.set_markup(text); + if (text.empty()) { + event_box_.hide(); + } else { + event_box_.show(); + } } if (tooltipEnabled()) { if (tooltip_format.empty() && config_["tooltip-format"].isString()) {