Skip to content

Commit 839975c

Browse files
authored
Merge pull request #2318 from calvinchd/hyprland-window-remove-empty-css
hyprland/window remove duplicate empty css
2 parents 185aa10 + 8687ed2 commit 839975c

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

man/waybar-hyprland-window.5.scd

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Invalid expressions (e.g., mismatched parentheses) are skipped.
6363
# STYLE
6464

6565
- *#window*
66-
- *#window.empty* When no windows are in the workspace
66+
- *window#waybar.empty #window* When no windows are in the workspace
6767

6868
The following classes are applied to the entire Waybar rather than just the
6969
window widget:

src/modules/hyprland/window.cpp

+1-8
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,7 @@ auto Window::update() -> void {
4848
std::string window_name = waybar::util::sanitize_string(workspace_.last_window_title);
4949
std::string window_address = workspace_.last_window;
5050

51-
if (window_name != window_data_.title) {
52-
if (window_name.empty()) {
53-
label_.get_style_context()->add_class("empty");
54-
} else {
55-
label_.get_style_context()->remove_class("empty");
56-
}
57-
window_data_.title = window_name;
58-
}
51+
window_data_.title = window_name;
5952

6053
if (!format_.empty()) {
6154
label_.show();

0 commit comments

Comments
 (0)