mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
separate css class for empty workspaces
This commit is contained in:
@ -374,6 +374,8 @@ Workspace::Workspace(const Bar &bar, const Json::Value &config, WorkspaceGroup &
|
||||
name_(name) {
|
||||
if (workspace) {
|
||||
add_workspace_listener(workspace, this);
|
||||
} else {
|
||||
state_ = (uint32_t)State::EMPTY;
|
||||
}
|
||||
|
||||
auto config_format = config["format"];
|
||||
@ -447,6 +449,8 @@ auto Workspace::handle_remove() -> void {
|
||||
}
|
||||
if (!persistent_) {
|
||||
workspace_group_.remove_workspace(id_);
|
||||
} else {
|
||||
state_ = (uint32_t)State::EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
@ -465,6 +469,7 @@ auto Workspace::handle_done() -> void {
|
||||
add_or_remove_class(style_context, is_active(), "active");
|
||||
add_or_remove_class(style_context, is_urgent(), "urgent");
|
||||
add_or_remove_class(style_context, is_hidden(), "hidden");
|
||||
add_or_remove_class(style_context, is_empty(), "persistent");
|
||||
|
||||
if (workspace_group_.creation_delayed()) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user