forge
Explore
Log in

Don't you dare go Hollow

wiki: Clarify animations

Browse files at this commit

dee0abb713105b68b58014d65d569b557e6ccf44Ivan MolodetskikhParent: bbb4a64
wiki/Configuration:-Animations.mdmodified+58 -41
@@ -20,14 +20,6 @@ animations {
2020 spring damping-ratio=1.0 stiffness=1000 epsilon=0.0001
2121 }
2222
23- horizontal-view-movement {
24- spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
25- }
26-
27- window-movement {
28- spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
29- }
30-
3123 window-open {
3224 duration-ms 150
3325 curve "ease-out-expo"
@@ -38,6 +30,14 @@ animations {
3830 curve "ease-out-quad"
3931 }
4032
33+ horizontal-view-movement {
34+ spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
35+ }
36+
37+ window-movement {
38+ spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
39+ }
40+
4141 window-resize {
4242 spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
4343 }
@@ -132,75 +132,73 @@ animations {
132132 }
133133 ```
134134
135-#### `horizontal-view-movement`
135+#### `window-open`
136136
137-All horizontal camera view movement animations, such as:
137+Window opening animation.
138138
139-- When a window off-screen is focused and the camera scrolls to it.
140-- When a new window appears off-screen and the camera scrolls to it.
141-- When a window resizes bigger and the camera scrolls to show it in full.
142- - Since 0.1.5, animated window resizes will use the `window-resize` animation parameters for the view animation to make them synchronized.
143-- After a horizontal touchpad gesture (a spring is recommended).
139+This one uses an easing type by default.
144140
145141 ```
146142 animations {
147- horizontal-view-movement {
148- spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
143+ window-open {
144+ duration-ms 150
145+ curve "ease-out-expo"
149146 }
150147 }
151148 ```
152149
153-#### `window-movement`
150+#### `window-close`
154151
155152 <sup>Since: 0.1.5</sup>
156153
157-Movement of individual windows within a workspace.
158-
159-Includes:
160-
161-- Moving window columns with `move-column-left` and `move-column-right`.
162-- Moving windows inside a column with `move-window-up` and `move-window-down`.
163-- Since 0.1.5, moving windows out of the way upon window opening and closing.
164-- Since 0.1.5, window movement between columns when consuming/expelling.
154+Window closing animation.
165155
166-This animation *does not* include the camera view movement, such as scrolling the workspace left and right.
156+This one uses an easing type by default.
167157
168158 ```
169159 animations {
170- window-movement {
171- spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
160+ window-open {
161+ duration-ms 150
162+ curve "ease-out-quad"
172163 }
173164 }
174165 ```
175166
176-#### `window-open`
167+#### `horizontal-view-movement`
177168
178-Window opening animation.
169+All horizontal camera view movement animations, such as:
179170
180-This one uses an easing type by default.
171+- When a window off-screen is focused and the camera scrolls to it.
172+- When a new window appears off-screen and the camera scrolls to it.
173+- After a horizontal touchpad gesture (a spring is recommended).
181174
182175 ```
183176 animations {
184- window-open {
185- duration-ms 150
186- curve "ease-out-expo"
177+ horizontal-view-movement {
178+ spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
187179 }
188180 }
189181 ```
190182
191-#### `window-close`
183+#### `window-movement`
192184
193185 <sup>Since: 0.1.5</sup>
194186
195-Window closing animation.
187+Movement of individual windows within a workspace.
196188
197-This one uses an easing type by default.
189+Includes:
190+
191+- Moving window columns with `move-column-left` and `move-column-right`.
192+- Moving windows inside a column with `move-window-up` and `move-window-down`.
193+- Moving windows out of the way upon window opening and closing.
194+- Window movement between columns when consuming/expelling.
195+
196+This animation *does not* include the camera view movement, such as scrolling the workspace left and right.
198197
199198 ```
200199 animations {
201- window-open {
202- duration-ms 150
203- curve "ease-out-quad"
200+ window-movement {
201+ spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
204202 }
205203 }
206204 ```
@@ -235,3 +233,22 @@ animations {
235233 }
236234 }
237235 ```
236+
237+### Synchronized Animations
238+
239+<sup>Since: 0.1.5</sup>
240+
241+Sometimes, when two animations are meant to play together synchronized, niri will drive them both with the same configuration.
242+
243+For example, if a window resize causes the view to move, then that view movement animation will also use the `window-resize` configuration (rather than the `horizontal-view-movement` configuration).
244+This is especially important for animated resizes to look good when using `center-focused-column "always"`.
245+
246+As another example, resizing a window in a column vertically causes other windows to move up or down into their new position.
247+This movement will use the `window-resize` configuration, rather than the `window-movement` configuration, to keep the animations synchronized.
248+
249+A few actions are still missing this synchronization logic, since in some cases it is difficult to implement properly.
250+Therefore, for the best results, consider using the same parameters for related animations (they are all the same by default):
251+
252+- `horizontal-view-movement`
253+- `window-movement`
254+- `window-resize`