mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-12 06:02:30 +02:00
feat(Network): hide on empty format
This commit is contained in:
@ -280,6 +280,11 @@ auto waybar::modules::Network::update() -> void {
|
|||||||
fmt::arg("bandwidthUpOctets", pow_format(bandwidth_up / interval_.count(), "o/s")));
|
fmt::arg("bandwidthUpOctets", pow_format(bandwidth_up / interval_.count(), "o/s")));
|
||||||
if (text != label_.get_label()) {
|
if (text != label_.get_label()) {
|
||||||
label_.set_markup(text);
|
label_.set_markup(text);
|
||||||
|
if (text.empty()) {
|
||||||
|
event_box_.hide();
|
||||||
|
} else {
|
||||||
|
event_box_.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (tooltipEnabled()) {
|
if (tooltipEnabled()) {
|
||||||
if (tooltip_format.empty() && config_["tooltip-format"].isString()) {
|
if (tooltip_format.empty() && config_["tooltip-format"].isString()) {
|
||||||
|
Reference in New Issue
Block a user