Merge pull request #4766 from zjeffer/fix/zjeffer/persistent-special-workspaces

hyprland/workspaces: don't show persistent special workspaces if show-special is disabled
This commit is contained in:
Alexis Rouillard 2026-01-14 18:27:30 +01:00 committed by GitHub
commit b4854f96a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -296,6 +296,11 @@ void Workspaces::loadPersistentWorkspacesFromWorkspaceRules(const Json::Value &c
auto workspace = rule.isMember("defaultName") ? rule["defaultName"].asString() auto workspace = rule.isMember("defaultName") ? rule["defaultName"].asString()
: rule["workspaceString"].asString(); : rule["workspaceString"].asString();
// There could be persistent special workspaces, only show those when show-special is enabled.
if (workspace.starts_with("special:") && !showSpecial()) {
continue;
}
// The prefix "name:" cause mismatches with workspace names taken anywhere else. // The prefix "name:" cause mismatches with workspace names taken anywhere else.
if (workspace.starts_with("name:")) { if (workspace.starts_with("name:")) {
workspace = workspace.substr(5); workspace = workspace.substr(5);