mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Merge pull request #2318 from calvinchd/hyprland-window-remove-empty-css
hyprland/window remove duplicate empty css
This commit is contained in:
commit
839975c348
@ -63,7 +63,7 @@ Invalid expressions (e.g., mismatched parentheses) are skipped.
|
|||||||
# STYLE
|
# STYLE
|
||||||
|
|
||||||
- *#window*
|
- *#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
|
The following classes are applied to the entire Waybar rather than just the
|
||||||
window widget:
|
window widget:
|
||||||
|
@ -48,14 +48,7 @@ auto Window::update() -> void {
|
|||||||
std::string window_name = waybar::util::sanitize_string(workspace_.last_window_title);
|
std::string window_name = waybar::util::sanitize_string(workspace_.last_window_title);
|
||||||
std::string window_address = workspace_.last_window;
|
std::string window_address = workspace_.last_window;
|
||||||
|
|
||||||
if (window_name != window_data_.title) {
|
window_data_.title = window_name;
|
||||||
if (window_name.empty()) {
|
|
||||||
label_.get_style_context()->add_class("empty");
|
|
||||||
} else {
|
|
||||||
label_.get_style_context()->remove_class("empty");
|
|
||||||
}
|
|
||||||
window_data_.title = window_name;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!format_.empty()) {
|
if (!format_.empty()) {
|
||||||
label_.show();
|
label_.show();
|
||||||
|
Loading…
Reference in New Issue
Block a user