{
  lib,
  config,
  ...
}: let
  inherit (lib) mkIf;
  cfg = config.horseman.wm.hyprland;

  easeOut = {
    startX = 0.23;
    startY = 1.0;
    endX = 0.32;
    endY = 1.0;
  };
  easeInOut = {
    startX = 0.65;
    startY = 0.05;
    endX = 0.36;
    endY = 1.0;
  };
  linear = {
    startX = 0.0;
    startY = 0.0;
    endX = 1.0;
    endY = 1.0;
  };
  slowFade = {
    startX = 0.4;
    startY = 1.0;
    endX = 0.4;
    endY = 1.0;
  };
in {
  config = mkIf cfg.enable {
    nix-hyprland = {
      animations = {
        enabled = true;
        animations = {
          global = {
            enabled = false;
          };

          border = {
            speed = 3;
            curve = easeOut;
          };

          workspaces = {
            speed = 3;
            curve = easeInOut;
            style = "slidefade 5%";
          };

          specialWorkspace = {
            speed = 3;
            curve = easeInOut;
            style = "slidefadevert 10%";
          };

          fadeDpms = {
            speed = 20;
            curve = slowFade;
          };
          fadeLayers = {
            speed = 1.5;
            curve = linear;
          };
          fadeSwitch = {
            speed = 3;
            curve = easeOut;
          };

          windows = {
            speed = 3;
            curve = easeOut;
            style = "gnomed";
          };

          layers = {
            speed = 1.5;
            curve = slowFade;
            style = "popin";
          };

          fadeOut = {
            speed = 2;
            curve = linear;
          };
        };
      };
    };
  };
}
