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 <noreply@anthropic.com>
This commit is contained in:
@@ -127,6 +127,8 @@ makeEnable config "myModules.xmonad" true {
|
|||||||
# Set clamping to false for bounce/overshoot effects
|
# Set clamping to false for bounce/overshoot effects
|
||||||
animations = (
|
animations = (
|
||||||
# Window move/resize animation with spring physics
|
# 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"];
|
triggers = ["geometry"];
|
||||||
offset-x = {
|
offset-x = {
|
||||||
@@ -139,6 +141,16 @@ makeEnable config "myModules.xmonad" true {
|
|||||||
start = "window-y-before - window-y";
|
start = "window-y-before - window-y";
|
||||||
end = 0;
|
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
|
# Opacity fade animation
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user