From daf291154080858fe7ccfe9c32acd7beb8a791a2 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 2 Feb 2026 13:10:33 -0800 Subject: [PATCH] picom: add scale animation for size changes in geometry trigger When both size AND position change (common in tiling WMs), picom's win_position_changed() returns false. Only size_changed is true. This means the geometry trigger fires but only scale-x/y change, not offset-x/y. Added scale-x and scale-y with spring physics to the geometry animation so windows animate properly when resized. Co-Authored-By: Claude Opus 4.5 --- nixos/xmonad.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nixos/xmonad.nix b/nixos/xmonad.nix index a2e38523..5d7078d6 100644 --- a/nixos/xmonad.nix +++ b/nixos/xmonad.nix @@ -127,6 +127,8 @@ makeEnable config "myModules.xmonad" true { # Set clamping to false for bounce/overshoot effects animations = ( # Window move/resize animation with spring physics + # Note: "geometry" is alias for "size" + "position" triggers + # position_changed is FALSE if size also changed, so we need scale-x/y too { triggers = ["geometry"]; offset-x = { @@ -139,6 +141,16 @@ makeEnable config "myModules.xmonad" true { start = "window-y-before - window-y"; end = 0; }; + scale-x = { + curve = "spring(250, 20, 1, false)"; + start = "window-width-before / window-width"; + end = 1; + }; + scale-y = { + curve = "spring(250, 20, 1, false)"; + start = "window-height-before / window-height"; + end = 1; + }; }, # Opacity fade animation {