From de3471b3356280e692109cea81e426b7222a8aea Mon Sep 17 00:00:00 2001 From: ItsOhen Date: Fri, 13 Mar 2026 22:50:34 +0100 Subject: config/workspacerule: add animation style (#13380) --- src/config/ConfigManager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index e4632bb9..93edfe23 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -1681,6 +1681,8 @@ SWorkspaceRule CConfigManager::mergeWorkspaceRules(const SWorkspaceRule& rule1, mergedRule.layoutopts[layoutopt.first] = layoutopt.second; } } + if (rule2.animationStyle.has_value()) + mergedRule.animationStyle = rule2.animationStyle; return mergedRule; } @@ -1921,7 +1923,6 @@ PHLMONITOR CConfigManager::getBoundMonitorForWS(const std::string& wsname) { std::string CConfigManager::getBoundMonitorStringForWS(const std::string& wsname) { for (auto const& wr : m_workspaceRules) { const auto WSNAME = wr.workspaceName.starts_with("name:") ? wr.workspaceName.substr(5) : wr.workspaceName; - if (WSNAME == wsname) return wr.monitor; } @@ -2774,6 +2775,9 @@ std::optional CConfigManager::handleWorkspaceRules(const std::strin } else if ((delim = rule.find("layout:")) != std::string::npos) { std::string layout = rule.substr(delim + 7); wsRule.layout = std::move(layout); + } else if ((delim = rule.find("animation:")) != std::string::npos) { + std::string animationStyle = rule.substr(delim + 10); + wsRule.animationStyle = std::move(animationStyle); } return {}; -- cgit v1.2.3