Skip to main content
Niri has several animations which you can configure in the same way. Additionally, you can disable or slow down all animations at once.

Quick Overview

Here’s a quick glance at the available animations with their default values:
animations {
    // Uncomment to turn off all animations.
    // You can also put "off" into each individual animation to disable it.
    // off

    // Slow down all animations by this factor. Values below 1 speed them up instead.
    // slowdown 3.0

    // Individual animations.

    workspace-switch {
        spring damping-ratio=1.0 stiffness=1000 epsilon=0.0001
    }

    window-open {
        duration-ms 150
        curve "ease-out-expo"
    }

    window-close {
        duration-ms 150
        curve "ease-out-quad"
    }

    horizontal-view-movement {
        spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
    }

    window-movement {
        spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
    }

    window-resize {
        spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
    }

    config-notification-open-close {
        spring damping-ratio=0.6 stiffness=1000 epsilon=0.001
    }

    exit-confirmation-open-close {
        spring damping-ratio=0.6 stiffness=500 epsilon=0.01
    }

    screenshot-ui-open {
        duration-ms 200
        curve "ease-out-quad"
    }

    overview-open-close {
        spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
    }

    recent-windows-close {
        spring damping-ratio=1.0 stiffness=800 epsilon=0.001
    }
}

Global Animation Controls

Disable All Animations

animations {
    off
}

Slow Down Animations

slowdown
number
Slow down all animations by this factor. Values below 1 speed them up instead.
animations {
    // Slow down all animations by 3x
    slowdown 3.0
}

Animation Types

There are two animation types: easing and spring. Each animation can be either an easing or a spring.

Easing

This is a relatively common animation type that changes the value over a set duration using an interpolation curve.
duration-ms
number
Duration of the animation in milliseconds.
curve
string
The easing curve to use. Available options:
  • "ease-out-quad" (since 0.1.5)
  • "ease-out-cubic"
  • "ease-out-expo"
  • "linear" (since 0.1.6)
  • "cubic-bezier" (since 25.08) - Custom cubic Bézier curve
animations {
    window-open {
        duration-ms 150
        curve "ease-out-expo"
    }
}

Custom Cubic Bézier

Available since version 25.08
A custom cubic Bézier curve. You need to set 4 numbers defining the control points of the curve:
animations {
    window-open {
        // Same as CSS cubic-bezier(0.05, 0.7, 0.1, 1)
        curve "cubic-bezier" 0.05 0.7 0.1 1
    }
}
You can tweak the cubic-bezier parameters on pages like easings.co or preview curves at easings.net.

Spring

Spring animations use a model of a physical spring to animate the value. They notably feel better with touchpad gestures, because they take into account the velocity of your fingers as you release the swipe. Springs can also oscillate/bounce at the end with the right parameters if you like that sort of thing, but they don’t have to (and by default they mostly don’t).
You can use the Elastic app to help visualize how the spring parameters change the animation.
A spring animation is configured with three mandatory parameters:
animations {
    workspace-switch {
        spring damping-ratio=1.0 stiffness=1000 epsilon=0.0001
    }
}
damping-ratio
number
default:"1.0"
Goes from 0.1 to 10.0:
  • below 1.0: underdamped spring, will oscillate in the end
  • 1.0: critically damped spring, comes to rest in minimum possible time without oscillations
  • above 1.0: overdamped spring, won’t oscillate
Overdamped springs currently have some numerical stability issues and may cause graphical glitches. Therefore, setting damping-ratio above 1.0 is not recommended.
stiffness
number
Lower stiffness results in a slower animation more prone to oscillation.
epsilon
number
Set to a lower value if the animation “jumps” at the end.
The spring mass (which you can see in Elastic) is hardcoded to 1.0 and cannot be changed. Instead, change stiffness proportionally. E.g. increasing mass by 2× is the same as decreasing stiffness by 2×.

Individual Animations

workspace-switch

workspace-switch
spring
Animation when switching workspaces up and down, including after the vertical touchpad gesture. A spring is recommended for this animation.
animations {
    workspace-switch {
        spring damping-ratio=1.0 stiffness=1000 epsilon=0.0001
    }
}

window-open

window-open
easing
Window opening animation. Uses an easing type by default.
animations {
    window-open {
        duration-ms 150
        curve "ease-out-expo"
    }
}

Custom Shader

Available since version 0.1.6
Custom shaders do not have a backwards compatibility guarantee. The interface may change as new features are developed.
You can write a custom shader for drawing the window during an open animation. See the example shader for full documentation.
animations {
    window-open {
        duration-ms 250
        curve "linear"

        custom-shader r"
            vec4 open_color(vec3 coords_geo, vec3 size_geo) {
                vec4 color = vec4(0.0);

                if (0.0 <= coords_geo.x && coords_geo.x <= 1.0
                        && 0.0 <= coords_geo.y && coords_geo.y <= 1.0)
                {
                    vec4 from = vec4(1.0, 0.0, 0.0, 1.0);
                    vec4 to = vec4(0.0, 1.0, 0.0, 1.0);
                    color = mix(from, to, coords_geo.y);
                }

                return color * niri_clamped_progress;
            }
        "
    }
}

window-close

Available since version 0.1.5
window-close
easing
Window closing animation. Uses an easing type by default.
animations {
    window-close {
        duration-ms 150
        curve "ease-out-quad"
    }
}
Custom shaders are also supported for window-close. See the example shader for details.

horizontal-view-movement

horizontal-view-movement
spring
All horizontal camera view movement animations, such as:
  • When a window off-screen is focused and the camera scrolls to it
  • When a new window appears off-screen and the camera scrolls to it
  • After a horizontal touchpad gesture (a spring is recommended)
animations {
    horizontal-view-movement {
        spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
    }
}

window-movement

Available since version 0.1.5
window-movement
spring
Movement of individual windows within a workspace. Includes:
  • Moving window columns with move-column-left and move-column-right
  • Moving windows inside a column with move-window-up and move-window-down
  • Moving windows out of the way upon window opening and closing
  • Window movement between columns when consuming/expelling
This animation does not include camera view movement, such as scrolling the workspace left and right.
animations {
    window-movement {
        spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
    }
}

window-resize

Available since version 0.1.5
window-resize
spring
Window resize animation. Only manual window resizes are animated (when you resize with switch-preset-column-width or maximize-column). Very small resizes (up to 10 pixels) are not animated.
animations {
    window-resize {
        spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
    }
}
Custom shaders are also supported for window-resize. See the example shader for details.

config-notification-open-close

config-notification-open-close
spring
The open/close animation of the config parse error and new default config notifications. Uses an underdamped spring by default (damping-ratio=0.6) which causes a slight oscillation.
animations {
    config-notification-open-close {
        spring damping-ratio=0.6 stiffness=1000 epsilon=0.001
    }
}

exit-confirmation-open-close

Available since version 25.08
exit-confirmation-open-close
spring
The open/close animation of the exit confirmation dialog. Uses an underdamped spring by default (damping-ratio=0.6) which causes a slight oscillation.
animations {
    exit-confirmation-open-close {
        spring damping-ratio=0.6 stiffness=500 epsilon=0.01
    }
}

screenshot-ui-open

Available since version 0.1.8
screenshot-ui-open
easing
The open (fade-in) animation of the screenshot UI.
animations {
    screenshot-ui-open {
        duration-ms 200
        curve "ease-out-quad"
    }
}

overview-open-close

Available since version 25.05
overview-open-close
spring
The open/close zoom animation of the Overview.
animations {
    overview-open-close {
        spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
    }
}

recent-windows-close

Available since version 25.11
recent-windows-close
spring
The close fade-out animation of the recent windows switcher.
animations {
    recent-windows-close {
        spring damping-ratio=1.0 stiffness=800 epsilon=0.001
    }
}

Synchronized Animations

Available since version 0.1.5
Sometimes, when two animations are meant to play together synchronized, niri will drive them both with the same configuration. For example:
  • If a window resize causes the view to move, that view movement animation will use the window-resize configuration (rather than horizontal-view-movement)
  • Resizing a window in a column vertically causes other windows to move up or down, using the window-resize configuration (rather than window-movement)
This is especially important for animated resizes to look good when using center-focused-column "always".
For the best results, consider using the same parameters for related animations (they are all the same by default):
  • horizontal-view-movement
  • window-movement
  • window-resize

Build docs developers (and LLMs) love