You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

89 lines
3.1 KiB

#!/bin/bash
#export DXVK_LOG_LEVEL=none
#export ENABLE_GAMESCOPE_WSI=1
export LD_BIND_NOW=1
#export MESA_LOADER_DRIVER_OVERRIDE=zink
#export RADV_PERFTEST=gpl,nggc,rt
#export VKD3D_CONFIG=nodxr
#export VKD3D_FEATURE_LEVEL=12_1
export WINEFSYNC=1
#export NO_GAMEMODE=1
#export WINEDEBUG=-all
#export WINEDLLOVERRIDES=winedbg.exe=
height=1200
width=1920
if [ $(xrandr --prop | grep 18180103803c22782aeed5a356509f26) ]; then
height=1080
fi
if [ -z $STEAM_COMPAT_DATA_PATH ]; then
export STEAM_COMPAT_DATA_PATH="/home/alex/.wine_proton"
fi
command="gamescope -f -F nis -o 30 -w $width -h $height -- mangohud --dlsym ENABLE_VKBASALT=1 gamemoderun"
#command="gamescope -U -o 30 -w 1280 -h 800 -- gamemoderun mangohud ENABLE_VKBASALT=1"
if [ $NO_GAMESCOPE ]; then
command="mangohud --dlsym ENABLE_VKBASALT=1 gamemoderun"
fi
if [ $NO_GAMEMODE ]; then
notify-send 'Starte ohne gamemode' --icon=emblem-games
command="gamescope -f -F nis -o 30 -w $width -h $height -- mangohud --dlsym ENABLE_VKBASALT=1"
fi
if [[ "$@" == *"/mnt/gaming/"* || $GAMING_HDD ]]; then
notifyId=$(notify-send 'Fahre Festplatte hoch' 'Geduld junger Padawan...' --icon=drive-harddisk -p)
$(output="$(echo -n $(sudo hdparm -S 0 /dev/sda))"; notify-send 'Festplatte läuft' "$output" --icon=drive-harddisk -r $notifyId) &
fi
if [ $# -eq 1 ]; then
$command "$1"
elif [[ "$@" == *"SteamLaunch"* ]] || [[ "$@" == *"/Heroic/"* ]]; then
$command "$@"
else
export STEAM_COMPAT_CLIENT_INSTALL_PATH=/home/alex/.steam
cd "$1"
wine="wine"
if [ "$3" ]; then
wine="$3"
if [ "$wine" == "staging" ]; then
wine="/opt/wine-tkg-staging-fsync-git-opt/bin/wine"
fi
fi
if [ "$4" != "true" ] && [[ "$wine" != *"proton"* ]]; then
wine="$wine explorer /desktop=Game,${width}x${height}"
fi
if [ "$wine" == "proton" ]; then
command="$command /home/alex/.local/share/Steam/compatibilitytools.d/GE-Proton7-55/proton run '$1$2'"
elif [ "$wine" == "proton-exp" ]; then
command="$command /home/alex/.local/share/Steam/steamapps/common/Proton\ -\ Experimental/proton run '$1$2'"
elif [ "$wine" == "proton-6" ]; then
command="$command /home/alex/.local/share/Steam/steamapps/common/Proton\ 6.3/proton run '$1$2'"
elif [ "$wine" == "proton-7" ]; then
command="$command /home/alex/.local/share/Steam/steamapps/common/Proton\ 7.0/proton run '$1$2'"
elif [ "$wine" == "proton-8" ]; then
command="$command /home/alex/.local/share/Steam/steamapps/common/Proton\ 8.0/proton run '$1$2'"
elif [ "$wine" == "proton-ge" ]; then
command="$command /home/alex/.local/share/Steam/compatibilitytools.d/GE-Proton8-22/proton run '$1$2'"
elif [ "$wine" == "proton-ge-13" ]; then
command="$command /home/alex/.local/share/Steam/compatibilitytools.d/GE-Proton8-13/proton run '$1$2'"
else
command="$command $wine $2"
fi
#xfce4-terminal -e "bash -c \"$command\";bash"
#echo $wine
#echo $command
bash -c "$command"
#sudo killall $(echo $2 | cut -d ' ' -f1)
#sudo killall explorer.exe
fi
if [[ "$@" == *"/mnt/gaming/"* || $GAMING_HDD ]]; then
output="$(echo -n $(sudo hdparm -S 60 /dev/sda))"
notify-send 'Setze Timeout für Festplatte' "$output" --icon=drive-harddisk
fi