From 4bc669f9331bb66ab30bd705d09f1239bc3e83ed Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 28 Feb 2024 15:00:34 +0000 Subject: layers: add fully featured animations Adds configs and layerrules to handle them alas fixes #981 I have cooked --- src/config/ConfigManager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 5cb18e0f..151347ad 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -617,6 +617,7 @@ void CConfigManager::setDefaultAnimationVars() { if (isFirstLaunch) { INITANIMCFG("global"); INITANIMCFG("windows"); + INITANIMCFG("layers"); INITANIMCFG("fade"); INITANIMCFG("border"); INITANIMCFG("borderangle"); @@ -644,6 +645,7 @@ void CConfigManager::setDefaultAnimationVars() { animationConfig["global"] = {false, "default", "", 8.f, 1, &animationConfig["general"], nullptr}; CREATEANIMCFG("windows", "global"); + CREATEANIMCFG("layers", "global"); CREATEANIMCFG("fade", "global"); CREATEANIMCFG("border", "global"); CREATEANIMCFG("borderangle", "global"); @@ -658,6 +660,7 @@ void CConfigManager::setDefaultAnimationVars() { CREATEANIMCFG("fadeSwitch", "fade"); CREATEANIMCFG("fadeShadow", "fade"); CREATEANIMCFG("fadeDim", "fade"); + CREATEANIMCFG("fadeLayers", "fade"); CREATEANIMCFG("specialWorkspace", "workspaces"); } @@ -1840,7 +1843,7 @@ bool windowRuleValid(const std::string& RULE) { } bool layerRuleValid(const std::string& RULE) { - return RULE == "noanim" || RULE == "blur" || RULE.starts_with("ignorealpha") || RULE.starts_with("ignorezero") || RULE.starts_with("xray"); + return RULE == "noanim" || RULE == "blur" || RULE.starts_with("ignorealpha") || RULE.starts_with("ignorezero") || RULE.starts_with("xray") || RULE.starts_with("animation"); } std::optional CConfigManager::handleWindowRule(const std::string& command, const std::string& value) { -- cgit v1.2.3