2022-10-19 15:22:42 +02:00
|
|
|
# Animations
|
|
|
|
|
2022-09-24 15:32:40 +02:00
|
|
|
## Table of contents
|
2022-10-19 15:22:42 +02:00
|
|
|
|
2022-09-24 15:32:40 +02:00
|
|
|
{{< toc >}}
|
|
|
|
|
|
|
|
## General
|
|
|
|
|
|
|
|
Animations are declared with the `animation` keyword.
|
|
|
|
|
2022-09-24 16:03:37 +02:00
|
|
|
```ini
|
2022-09-24 15:32:40 +02:00
|
|
|
animation=NAME,ONOFF,SPEED,CURVE,STYLE
|
|
|
|
or
|
|
|
|
animation=NAME,ONOFF,SPEED,CURVE
|
|
|
|
```
|
|
|
|
|
|
|
|
`ONOFF` can be either 0 or 1, 0 to disable, 1 to enable.
|
|
|
|
|
|
|
|
`SPEED` is the amount of ds (1ds = 100ms) the animation will take
|
|
|
|
|
|
|
|
`CURVE` is the bezier curve name, see [curves](#curves).
|
|
|
|
|
2022-10-19 16:12:57 +02:00
|
|
|
`STYLE` is the animation style
|
|
|
|
|
|
|
|
All the parameters are required, exepct the `STYLE` one.
|
2022-09-24 15:32:40 +02:00
|
|
|
|
|
|
|
The animations are a tree. If an animation is unset, it will inherit its
|
|
|
|
parent's values.
|
|
|
|
|
2022-10-19 16:12:57 +02:00
|
|
|
### Examples
|
|
|
|
|
|
|
|
```ini
|
|
|
|
animation=workspaces,1,8,default
|
|
|
|
animation=windows,1,10,myepiccurve,slide
|
|
|
|
```
|
|
|
|
|
|
|
|
## Animation tree
|
2022-09-24 15:32:40 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
global
|
|
|
|
↳ windows - styles: slide, popin
|
|
|
|
↳ windowsIn - window open
|
|
|
|
↳ windowsOut - window close
|
|
|
|
↳ windowsMove - everything in between, moving, dragging, resizing.
|
|
|
|
↳ fade
|
|
|
|
↳ fadeIn - fade in (open) -> layers and windows
|
|
|
|
↳ fadeOut - fade out (close) -> layers and windows
|
|
|
|
↳ fadeSwitch - fade on changing activewindow and its opacity
|
|
|
|
↳ fadeShadow - fade on changing activewindow for shadows
|
|
|
|
↳ fadeDim - the easing of the dimming of inactive windows
|
|
|
|
↳ border
|
|
|
|
↳ workspaces - styles: slide, slidevert, fade
|
|
|
|
↳ specialWorkspace - styles: same as workspaces
|
|
|
|
```
|
|
|
|
|
2022-10-19 16:12:57 +02:00
|
|
|
### Extras
|
2022-09-24 15:32:40 +02:00
|
|
|
|
|
|
|
For animation style `popin` in `windows`, you can specify a minimum percentage
|
|
|
|
to start from. For example:
|
|
|
|
|
2022-09-24 16:03:37 +02:00
|
|
|
```ini
|
2022-09-24 15:32:40 +02:00
|
|
|
animation=windows,1,8,default,popin 80%
|
|
|
|
```
|
|
|
|
|
|
|
|
will make the animation 80% -> 100% of the size.
|
|
|
|
|
2022-10-19 16:12:57 +02:00
|
|
|
### Curves
|
2022-09-24 15:32:40 +02:00
|
|
|
|
|
|
|
Defining your own Bezier curve can be done with the `bezier` keyword:
|
|
|
|
|
2022-09-24 16:03:37 +02:00
|
|
|
```ini
|
2022-09-24 15:32:40 +02:00
|
|
|
bezier=NAME,X0,Y0,X1,Y1
|
|
|
|
```
|
|
|
|
|
|
|
|
where `NAME` is the name, and the rest are two points for the Cubic Bezier. A
|
|
|
|
good website to design your bezier can be found
|
2022-10-19 16:12:57 +02:00
|
|
|
[here, on cssportal.com](https://www.cssportal.com/css-cubic-bezier-generator/),
|
|
|
|
if you want to instead choose from a list of beizers, you can check out [easings.net](https://easings.net).
|
2022-09-24 15:32:40 +02:00
|
|
|
|
2022-10-19 16:12:57 +02:00
|
|
|
#### Example
|
2022-09-24 15:32:40 +02:00
|
|
|
|
2022-09-24 16:03:37 +02:00
|
|
|
```ini
|
2022-09-24 15:32:40 +02:00
|
|
|
bezier=overshot,0.05,0.9,0.1,1.1
|
|
|
|
```
|