| 1 | #!/usr/bin/env bash |
| 2 | # Toggle Hyprland animations on/off at runtime. |
| 3 | |
| 4 | # Read current value (0/1) of animations:enabled |
| 5 | STATE="$(hyprctl -j getoption animations:enabled 2>/dev/null | sed -n 's/.*"int":\s*\([01]\).*/\1/p')" |
| 6 | |
| 7 | if [ "$STATE" = "1" ]; then |
| 8 | # Turn OFF (instant mode) |
| 9 | hyprctl keyword animations:enabled 0 |
| 10 | # (Optional) kill any lingering “special” anim feel by forcing short workspace anims |
| 11 | hyprctl keyword animations:workspacesIn "1 1 default slide" |
| 12 | hyprctl keyword animations:workspacesOut "1 1 default slide" |
| 13 | notify-send "hyprland flow" "animations OFF" |
| 14 | else |
| 15 | # Turn ON (back to your config-defined animations) |
| 16 | hyprctl keyword animations:enabled 1 |
| 17 | hyprctl reload |
| 18 | notify-send "hyprland flow" "animations ON" |
| 19 | fi |