Files
dotfiles/.config/hypr/scripts/mode-performance.sh

27 lines
864 B
Bash
Executable File

#!/bin/bash
msgId="3378455"
PERFORMANCE_MODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}')
if [ "$PERFORMANCE_MODE" = 1 ] ; then
hyprctl --batch "\
keyword general:allow_tearing 1;\
keyword animations:enabled 0;\
keyword animation borderangle,0; \
keyword decoration:shadow:enabled 0;\
keyword decoration:blur:enabled 0;\
keyword decoration:fullscreen_opacity 1;\
keyword general:gaps_in 0;\
keyword general:gaps_out 0;\
keyword general:border_size 1;\
keyword decoration:rounding 0"
notify-send -i "$HOME/.config/hypr/scripts/dunst/icons/cpu.svg" -u low -r "$msgId" "Performance mode [ON]"
exit
else
notify-send -i "$HOME/.config/hypr/scripts/dunst/icons/core.svg" -u low -r "$msgId" "Performance mode [OFF]"
hyprctl reload
exit 0
fi
exit 1