From 2dd9c334094edaddb0be991d449cdea1954628b3 Mon Sep 17 00:00:00 2001 From: Morwdan <5207513+Morwdan@users.noreply.github.com> Date: Sun, 18 Aug 2024 08:52:39 +0000 Subject: [PATCH] Add the ability to disable some of the kwin animations (#323) --- modules/kwin.nix | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/modules/kwin.nix b/modules/kwin.nix index dcf22258..80fdb1d0 100644 --- a/modules/kwin.nix +++ b/modules/kwin.nix @@ -73,7 +73,7 @@ let (x: x == value) (throw "getIndexFromEnum (kwin): Value ${value} isn't present in the enum. This is a bug") enum; - + convertPoloniumFilter = list: if list == null then null @@ -117,7 +117,7 @@ in }; minimization = { animation = mkOption { - type = with types; nullOr (enum [ "squash" "magiclamp" ]); + type = with types; nullOr (enum [ "squash" "magiclamp" "off" ]); default = null; example = "magiclamp"; description = "The effect when windows are minimized."; @@ -148,14 +148,14 @@ in description = "Arrange desktops in a virtual cube."; }; desktopSwitching.animation = mkOption { - type = with types; nullOr (enum [ "fade" "slide" ]); + type = with types; nullOr (enum [ "fade" "slide" "off" ]); default = null; example = "fade"; description = "The animation used when switching virtual desktop."; }; windowOpenClose = { animation = mkOption { - type = with types; nullOr (enum [ "fade" "glide" "scale" ]); + type = with types; nullOr (enum [ "fade" "glide" "scale" "off" ]); default = null; example = "glide"; description = "The animation used when opening/closing windows."; @@ -361,14 +361,16 @@ in }; layout = { engine = - let enumVals = [ - "binaryTree" - "half" - "threeColumn" - "monocle" - "kwin" - ]; - in mkOption { + let + enumVals = [ + "binaryTree" + "half" + "threeColumn" + "monocle" + "kwin" + ]; + in + mkOption { type = with types; nullOr (enum enumVals); default = null; example = "binaryTree";