Update gaming optimization script.

This commit is contained in:
CronyAkatsuki 2023-12-10 18:49:23 +01:00
parent 6a9a9dd8d4
commit bb0e48b95e

View File

@ -37,19 +37,19 @@ x11_on () {
xrandr --output eDP --set TearFree off xrandr --output eDP --set TearFree off
} }
if [ -f $HOME/.cache/gaming.lock ]; then if [ -f "$HOME"/.cache/gaming.lock ]; then
[ $XDG_SESSION_TYPE = "wayland" ] && wayland_off || x11_off [ "$XDG_SESSION_TYPE" = "wayland" ] && wayland_off || x11_off
start-program transmission-daemon start-program transmission-daemon
start-program syncthing start-program syncthing
nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=2' nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=2'
rm $HOME/.cache/gaming.lock rm "$HOME"/.cache/gaming.lock
quick-notify "Gaming Time" "OFF" quick-notify "Gaming Time" "OFF"
else else
[ $XDG_SESSION_TYPE = "wayland" ] && wayland_on || x11_on [ "$XDG_SESSION_TYPE" = "wayland" ] && wayland_on || x11_on
transmission-remote --exit transmission-remote --exit
syncthing cli operations shutdown syncthing cli operations shutdown
kill-nicely ferdium kill-nicely ferdium
nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=1' nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=1'
touch $HOME/.cache/gaming.lock touch "$HOME"/.cache/gaming.lock
quick-notify "Gaming Time" "ON" quick-notify "Gaming Time" "ON"
fi fi