diff --git a/nixos/overlay.nix b/nixos/overlay.nix index 0fb95ce3..feac2a5d 100644 --- a/nixos/overlay.nix +++ b/nixos/overlay.nix @@ -168,16 +168,15 @@ in }; }); + # Using mainline picom with spring physics animation support + # Branch: spring-physics on colonelpanic8/picom picom = prev.picom.overrideAttrs (old: { src = prev.fetchFromGitHub { repo = "picom"; - owner = "dccsillag"; - rev = "51b21355696add83f39ccdb8dd82ff5009ba0ae5"; - sha256 = "sha256-crCwRJd859DCIC0pEerpDqdX2j8ZrNAzVaSSB3mTPN8=="; + owner = "colonelpanic8"; + rev = "spring-physics"; + sha256 = "sha256-sN15PffeRV6x+K2XjCxx2bIh0ujb/C1GAGTUuo2wPL4="; }; - nativeBuildInputs = old.nativeBuildInputs ++ [final.pcre final.gnugrep.pcre2 final.asciidoc]; - buildInputs = old.buildInputs ++ [final.pcre]; - nativeInstallCheckInputs = []; doCheck = false; dontCheck = true; }); diff --git a/nixos/xmonad.nix b/nixos/xmonad.nix index a65bd400..cbfaef95 100644 --- a/nixos/xmonad.nix +++ b/nixos/xmonad.nix @@ -98,25 +98,73 @@ makeEnable config "myModules.xmonad" true { backend = "glx"; settings = { - animations = true; - animation-window-mass = 1; - animation-dampening = 20; - animation-stiffness = 250; - animation-clamping = false; - animation-for-open-window = "zoom"; - animation-for-unmap-window = "zoom"; - animation-for-transient-window = "slide-down"; + # Spring physics animations (mainline picom with spring-physics branch) + # Syntax: spring(stiffness, dampening, mass) or spring(stiffness, dampening, mass, clamping) + # Set clamping to false for bounce/overshoot effects + animations = [ + # Window move/resize animation with spring physics + { + triggers = ["geometry"]; + offset-x = { + curve = "spring(250, 20, 1, false)"; + start = "window-x-before - window-x"; + end = 0; + }; + offset-y = { + curve = "spring(250, 20, 1, false)"; + start = "window-y-before - window-y"; + end = 0; + }; + } + # Opacity fade animation + { + triggers = ["open" "show"]; + opacity = { + curve = "cubic-bezier(0.25, 0.1, 0.25, 1)"; + duration = 0.2; + start = 0; + end = "window-raw-opacity"; + }; + scale-x = { + curve = "cubic-bezier(0.25, 0.1, 0.25, 1)"; + duration = 0.2; + start = 0.9; + end = 1; + }; + scale-y = { + curve = "cubic-bezier(0.25, 0.1, 0.25, 1)"; + duration = 0.2; + start = 0.9; + end = 1; + }; + } + { + triggers = ["close" "hide"]; + opacity = { + curve = "cubic-bezier(0.25, 0.1, 0.25, 1)"; + duration = 0.2; + start = "window-raw-opacity"; + end = 0; + }; + scale-x = { + curve = "cubic-bezier(0.25, 0.1, 0.25, 1)"; + duration = 0.2; + start = 1; + end = 0.9; + }; + scale-y = { + curve = "cubic-bezier(0.25, 0.1, 0.25, 1)"; + duration = 0.2; + start = 1; + end = 0.9; + }; + } + ]; + fade-in-step = 0.028; fade-out-step = 0.028; fading = true; - }; - wintypes = { - dock = {animation = "slide-down";}; - toolbar = {animation = "slide-down";}; - }; - - settings = { focus-exclude = ["class_g ?= 'rofi'" "class_g ?= 'Steam'"]; rounded-corners-exclude = [ "! name~=''" # Qtile == empty wm_class..