punktdateien/hypr/scripts/performance-mode.sh

16 lines
740 B
Bash
Executable file

#!/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