punktdateien/hypr/scripts/perfmode.sh

17 lines
740 B
Bash
Raw Normal View History

2023-12-08 17:33:11 +01:00
#!/bin/bash
# jstm's hyprland performance mode
if [ "$(hyprctl getoption animations:enabled | awk 'NR==2{print $2}')" = 1 ] ; then # if animations are enabled, proceed
hyprctl --batch " \ # disable animations, shadows, blur, gaps window-to-window, gaps window-to-monitor, rounding and set border size to 1px
keyword animations:enabled 0; \
keyword decoration:drop_shadow 0; \
keyword decoration:blur:enabled 0; \
keyword general:gaps_in 0; \
keyword general:gaps_out 0; \
keyword general:border_size 1; \
keyword decoration:inactive_opacity 1; \
keyword decoration:rounding 0"
exit # stop execution to prevent "hyprctl reload" call
fi
hyprctl reload # animations are disabled, reloading instead