diff --git a/home/system/hyprland/default.nix b/home/system/hyprland/default.nix index d7dc8b6..8b4039f 100644 --- a/home/system/hyprland/default.nix +++ b/home/system/hyprland/default.nix @@ -178,16 +178,30 @@ "size 60% 60%, title:Bluetooth Devices" ]; - animations = { + animations = let + animationSpeed = config.var.theme.animation-speed; + + animationDuration = if animationSpeed == "slow" then + "4" + else if animationSpeed == "medium" then + "2.5" + else + "1.5"; + borderDuration = if animationSpeed == "slow" then + "10" + else if animationSpeed == "medium" then + "6" + else + "3"; + in { enabled = true; - # animations from end-4 dotfiles bezier = [ "linear, 0, 0, 1, 1" "md3_standard, 0.2, 0, 0, 1" "md3_decel, 0.05, 0.7, 0.1, 1" "md3_accel, 0.3, 0, 0.8, 0.15" "overshot, 0.05, 0.9, 0.1, 1.1" - "crazyshot, 0.1, 1.5, 0.76, 0.92 " + "crazyshot, 0.1, 1.5, 0.76, 0.92" "hyprnostretch, 0.05, 0.9, 0.1, 1.0" "menu_decel, 0.1, 1, 0, 1" "menu_accel, 0.38, 0.04, 1, 0.07" @@ -196,42 +210,20 @@ "easeOutExpo, 0.16, 1, 0.3, 1" "softAcDecel, 0.26, 0.26, 0.15, 1" "md2, 0.4, 0, 0.2, 1" - # old - # "linear, 0, 0, 1, 1" - # "md3_standard, 0.2, 0, 0, 1" - # "md3_decel, 0.05, 0.7, 0.1, 1" - # "md3_accel, 0.3, 0, 0.8, 0.15" - # "overshot, 0.05, 0.9, 0.1, 1.1" - # "crazyshot, 0.1, 1.5, 0.76, 0.92 " - # "hyprnostretch, 0.05, 0.9, 0.1, 1.0" - # "fluent_decel, 0.1, 1, 0, 1" - # "easeInOutCirc, 0.85, 0, 0.15, 1" - # "easeOutCirc, 0, 0.55, 0.45, 1" - # "easeOutExpo, 0.16, 1, 0.3, 1" ]; animation = [ - "windows, 1, 3, md3_decel, popin 60%" - "windowsIn, 1, 3, md3_decel, popin 60%" - "windowsOut, 1, 3, md3_accel, popin 60%" - "border, 1, 10, default" - "fade, 1, 3, md3_decel" - # animation = layers, 1, 2, md3_decel, slide - "layersIn, 1, 3, menu_decel, slide" - "layersOut, 1, 1.6, menu_accel" - "fadeLayersIn, 1, 2, menu_decel" - "fadeLayersOut, 1, 4.5, menu_accel" - "workspaces, 1, 7, menu_decel, slide" - # animation = workspaces, 1, 2.5, softAcDecel, slide - # animation = workspaces, 1, 7, menu_decel, slidefade 15% - # animation = specialWorkspace, 1, 3, md3_decel, slidefadevert 15% - "specialWorkspace, 1, 3, md3_decel, slidevert" - # old - # "windows, 1, 3, md3_decel, popin 60%" - # "border, 1, 10, default" - # "fade, 1, 2.5, md3_decel" - # "workspaces, 1, 3.5, easeOutExpo, slide" - # "specialWorkspace, 1, 3, md3_decel, slidevert" + "windows, 1, ${animationDuration}, md3_decel, popin 60%" + "windowsIn, 1, ${animationDuration}, md3_decel, popin 60%" + "windowsOut, 1, ${animationDuration}, md3_accel, popin 60%" + "border, 1, ${borderDuration}, default" + "fade, 1, ${animationDuration}, md3_decel" + "layersIn, 1, ${animationDuration}, menu_decel, slide" + "layersOut, 1, ${animationDuration}, menu_accel" + "fadeLayersIn, 1, ${animationDuration}, menu_decel" + "fadeLayersOut, 1, ${animationDuration}, menu_accel" + "workspaces, 1, ${animationDuration}, menu_decel, slide" + "specialWorkspace, 1, ${animationDuration}, md3_decel, slidevert" ]; }; diff --git a/hosts/guest/variables.nix b/hosts/guest/variables.nix index 45576d5..0dca59a 100644 --- a/hosts/guest/variables.nix +++ b/hosts/guest/variables.nix @@ -34,6 +34,7 @@ gaps-in = 12; gaps-out = config.var.theme.gaps-in * 2; border-size = 4; + animation-speed = "slow"; # "fast" | "medium" | "slow" fetch = "nerdfetch"; # "nerdfetch" | "neofetch" | "none" diff --git a/hosts/laptop/variables.nix b/hosts/laptop/variables.nix index db8a51e..2812419 100644 --- a/hosts/laptop/variables.nix +++ b/hosts/laptop/variables.nix @@ -34,6 +34,7 @@ gaps-in = 12; gaps-out = config.var.theme.gaps-in * 2; border-size = 4; + animation-speed = "slow"; # "fast" | "medium" | "slow" fetch = "nerdfetch"; # "nerdfetch" | "neofetch" | "none"