From 2be0e966e181aa70df454baccd342fb1c096be6d Mon Sep 17 00:00:00 2001 From: Calvin Chu Date: Sun, 16 Jul 2023 16:40:54 +1000 Subject: [PATCH 1/2] hyprland/window: remove .empty css class for #window --- src/modules/hyprland/window.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/modules/hyprland/window.cpp b/src/modules/hyprland/window.cpp index d01ac9d..81c864d 100644 --- a/src/modules/hyprland/window.cpp +++ b/src/modules/hyprland/window.cpp @@ -48,14 +48,7 @@ auto Window::update() -> void { std::string window_name = waybar::util::sanitize_string(workspace_.last_window_title); std::string window_address = workspace_.last_window; - if (window_name != window_data_.title) { - if (window_name.empty()) { - label_.get_style_context()->add_class("empty"); - } else { - label_.get_style_context()->remove_class("empty"); - } - window_data_.title = window_name; - } + window_data_.title = window_name; if (!format_.empty()) { label_.show(); From 8687ed20681da0cee615330d803de5bdf5cec11f Mon Sep 17 00:00:00 2001 From: Calvin Chu Date: Sun, 16 Jul 2023 16:41:50 +1000 Subject: [PATCH 2/2] Update man for hyprland/window to replace #window.empty with window#waybar.empty #window --- man/waybar-hyprland-window.5.scd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/waybar-hyprland-window.5.scd b/man/waybar-hyprland-window.5.scd index 64e48e4..5e7b4d5 100644 --- a/man/waybar-hyprland-window.5.scd +++ b/man/waybar-hyprland-window.5.scd @@ -63,7 +63,7 @@ Invalid expressions (e.g., mismatched parentheses) are skipped. # STYLE - *#window* -- *#window.empty* When no windows are in the workspace +- *window#waybar.empty #window* When no windows are in the workspace The following classes are applied to the entire Waybar rather than just the window widget: