diff --git a/Animations.md b/Animations.md new file mode 100644 index 0000000..cd68368 --- /dev/null +++ b/Animations.md @@ -0,0 +1,107 @@ +# Animations + +## General[](#general) + +Animations are declared with the `animation` keyword. + +```ini +animation = NAME, ONOFF, SPEED, CURVE [,STYLE] +``` + +`ONOFF` use `0` to disable, `1` to enable. _Note:_ if it’s `0`, you can omit further args. + +`SPEED` is the amount of ds (1ds = 100ms) the animation will take. + +`CURVE` is the bezier curve name, see [curves](#curves). + +`STYLE` (optional) is the animation style. + +The animations are a tree. If an animation is unset, it will inherit its parent’s values. See [the animation tree](#animation-tree). + +### Examples[](#examples) + +```ini +animation = workspaces, 1, 8, default +animation = windows, 1, 10, myepiccurve, slide +animation = fade, 0 +``` + +### Animation tree[](#animation-tree) + +```txt +global + ↳ windows - styles: slide, popin, gnomed + ↳ windowsIn - window open - styles: same as windows + ↳ windowsOut - window close - styles: same as windows + ↳ windowsMove - everything in between, moving, dragging, resizing. + ↳ layers - styles: slide, popin, fade + ↳ layersIn - layer open + ↳ layersOut - layer close + ↳ fade + ↳ fadeIn - fade in for window open + ↳ fadeOut - fade out for window close + ↳ fadeSwitch - fade on changing activewindow and its opacity + ↳ fadeShadow - fade on changing activewindow for shadows + ↳ fadeDim - the easing of the dimming of inactive windows + ↳ fadeLayers - for controlling fade on layers + ↳ fadeLayersIn - fade in for layer open + ↳ fadeLayersOut - fade out for layer close + ↳ fadePopups - for controlling fade on wayland popups + ↳ fadePopupsIn - fade in for wayland popup open + ↳ fadePopupsOut - fade out for wayland popup close + ↳ fadeDpms - for controlling fade when dpms is toggled + ↳ border - for animating the border's color switch speed + ↳ borderangle - for animating the border's gradient angle - styles: once (default), loop + ↳ workspaces - styles: slide, slidevert, fade, slidefade, slidefadevert + ↳ workspacesIn - styles: same as workspaces + ↳ workspacesOut - styles: same as workspaces + ↳ specialWorkspace - styles: same as workspaces + ↳ specialWorkspaceIn - styles: same as workspaces + ↳ specialWorkspaceOut - styles: same as workspaces + ↳ zoomFactor - animates the screen zoom + ↳ monitorAdded - monitor added zoom animation +``` + +⚠️ + +Using the `loop` style for `borderangle` requires Hyprland to _constantly_ render new frames at a frequency equal to your screen’s refresh rate (e.g. 60 times per second for a 60hz monitor), which might stress your CPU/GPU and will impact battery life. +This will apply even if animations are disabled or borders are not visible. + +## Curves[](#curves) + +Defining your own [Bézier curve](https://en.wikipedia.org/wiki/B%C3%A9zier_curve) can be done with the `bezier` keyword: + +```ini +bezier = NAME, X0, Y0, X1, Y1 +``` + +where `NAME` is a name of your choice and `X0, Y0, X1, Y1` are the the two control points for a Cubic Bézier curve. +A good website to design your own Bézier can be [cssportal.com](https://www.cssportal.com/css-cubic-bezier-generator/). +If you want to instead choose from a list of pre-made Béziers, you can check out [easings.net](https://easings.net). + +### Example[](#example) + +```ini +bezier = overshoot, 0.05, 0.9, 0.1, 1.1 +``` + +### Extras[](#extras) + +For animation style `popin` in `windows`, you can specify a minimum percentage to start from. For example, the following will make the animation 80% -> 100% of the size: + +```ini +animation = windows, 1, 8, default, popin 80% +``` + +For animation styles `slide`, `slidevert`, `slidefade` and `slidefadevert` in `workspaces`, you can specify a movement percentage. For example, the following will make windows move 20% of the screen width: + +```ini +animation = workspaces, 1, 8, default, slidefade 20% +``` + +For animation style `slide` in `windows` and `layers` you can specify a forced side. +You can choose between `top`, `bottom`, `left` or `right`. + +```ini +animation = windows, 1, 8, default, slide left +``` \ No newline at end of file diff --git a/hyprland.conf b/hyprland.conf index 15ecc31..6eb5163 100644 --- a/hyprland.conf +++ b/hyprland.conf @@ -94,7 +94,7 @@ decoration { passes = 3 } active_opacity = 1.0 - inactive_opacity = .86 + inactive_opacity = .95 fullscreen_opacity = 1.0 # drop_shadow = yes @@ -112,18 +112,67 @@ layerrule = ignorealpha 0.05, wlogout # ANIMATIONS #------------------------------------------------------------------ +# animations { +# enabled = yes + +# # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + +# bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + +# animation = windows, 1, 1, myBezier +# animation = windowsOut, 1, 1, default, popin 80% +# animation = border, 1, 1, default +# animation = fade, 1, 1, default +# animation = workspaces, 1, 1, default +#} + +# Smooth and natural feeling +bezier = smooth, 0.25, 0.1, 0.25, 1.0 +# Slight bounce for windows +bezier = bounce, 0.34, 1.56, 0.64, 1 +# Quick and snappy +bezier = snappy, 0.4, 0.0, 0.2, 1.0 +# Gentle easing for fades +bezier = gentle, 0.25, 0.46, 0.45, 0.94 +# Your current curve (refined) +bezier = myBezier, 0.05, 0.9, 0.1, 1.02 + animations { enabled = yes - - # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more - - bezier = myBezier, 0.05, 0.9, 0.1, 1.05 - - animation = windows, 1, 1, myBezier - animation = windowsOut, 1, 1, default, popin 80% - animation = border, 1, 1, default - animation = fade, 1, 1, default - animation = workspaces, 1, 1, default + + # Window animations - bouncy feel for opening/closing + animation = windows, 1, 3, bounce, slide + animation = windowsIn, 1, 1, myBezier, slide + animation = windowsOut, 1, 1, snappy, popin 85% + animation = windowsMove, 1, 2, smooth + + # Layer animations (notifications, bars, menus) + animation = layers, 1, 4, smooth, slide + animation = layersIn, 1, 4, smooth, slide + animation = layersOut, 1, 3, snappy, slide + + # Fade effects - smooth transitions + animation = fade, 1, 1, gentle + animation = fadeIn, 1, 1, gentle + animation = fadeOut, 1, 1, gentle + animation = fadeSwitch, 1, 1, gentle + animation = fadeShadow, 1, 1, gentle + animation = fadeDim, 1, 1, gentle + animation = fadeLayers, 1, 1, gentle + animation = fadeLayersIn, 1, 1, gentle + animation = fadeLayersOut, 1, 1, gentle + + # Border animations + animation = border, 1, 4, smooth + animation = borderangle, 1, 8, smooth + + # Workspace animations - slidefade for smooth transitions + animation = workspaces, 1, 2, smooth, slidefade 15% + animation = workspacesIn, 1, 2, smooth, slidefade 15% + animation = workspacesOut, 1, 2, snappy, slidefade 15% + animation = specialWorkspace, 1, 2, bounce, slidevert + animation = specialWorkspaceIn, 1, 2, bounce, slidevert + animation = specialWorkspaceOut, 1, 2, snappy, slidevert }