feat(hyprland): add "game mode" toggle

This mode turns off most animations and hides the UI to save resources.
This commit is contained in:
Kiana Sheibani 2026-01-28 21:39:42 -05:00
parent 2d5b25daa3
commit 0edf02262a
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,23 @@
#!/usr/bin/env bash
HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}')
if [ "$HYPRGAMEMODE" = 1 ] ; then
hyprctl --batch "\
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 0;\
keyword decoration:rounding 0"
hyprctl dispatch global "quickshell:hidden"
hyprctl notify 1 2000 "rgb(73daca)" "Gamemode [ON]"
exit
else
hyprctl notify 1 2000 "rgb(f7768e)" "Gamemode [OFF]"
hyprctl dispatch global "quickshell:hiddenoff"
hyprctl reload
exit 0
fi
exit 1