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.
 
 
 

115 lines
4.5 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 VKD3D_DEBUG=none
export WINEFSYNC=1
#export NO_GAMEMODE=1
export WINEDEBUG=-all
export ENABLE_GAMESCOPE_WSI=0
#export WINEDLLOVERRIDES=winedbg.exe=
height=1200
width=1920
# https://wiki.archlinux.org/title/Gamescopes
#setcap 'CAP_SYS_NICE=eip' $(which gamescope)
# main monitor
if [[ $(xfconf-query -c displays -p /ActiveProfile -v | grep b28b7af69320201d1cf206ebf28373980add1451) || $(xfconf-query -c displays -p /ActiveProfile -v | grep ce0b1612aa711b78a720295d271a33894e2b72bf) ]]; then
height=1080
fi
echo $height;
if [ -z $STEAM_COMPAT_DATA_PATH ]; then
export STEAM_COMPAT_DATA_PATH="/home/alex/.wine_proton"
fi
#export MANGOHUD_CONFIGFILE=/home/alex/.config/MangoHud/gamescope.conf
#export MANGOHUD_CONFIG=fps_limit=60+120+0+30,legacy_layout=false,gpu_stats,gpu_temp,gpu_core_clock,gpu_mem_clock,gpu_power,gpu_fan,gpu_junction_temp,gpu_load_change,gpu_load_value=50\,90,gpu_load_color=FFFFFF\,FFAA7F\,CC0000,gpu_text=RX6800,gpu_color=EB5B5B,gpu_voltage,vram,vram_color=EB5B5B,cpu_stats,cpu_temp,cpu_power,cpu_mhz,core_bars,cpu_load_change,core_load_change
#command="gamescope --force-grab-cursor -f -F fsr -o 24 -w $width -h $height --mangoapp gamemoderun"
command="gamescope --force-grab-cursor -f -F fsr -o 24 -w $width -h $height -- gamemoderun mangohud ENABLE_VKBASALT=1"
if [[ $NO_GAMESCOPE || "$@" == *"SteamLaunch"* ]]; then
command="mangohud --dlsym ENABLE_VKBASALT=1 gamemoderun"
fi
if [ $NO_GAMEMODE ]; then
notify-send 'Starte ohne gamemode' --icon=emblem-games
command="gamescope --force-grab-cursor -f -F fsr -o 24 -w $width -h $height -- mangohud ENABLE_VKBASALT=1"
fi
if [[ $NO_GAMEMODE && $NO_GAMESCOPE ]]; then
command="mangohud --dlsym ENABLE_VKBASALT=1 "
fi
if [[ "$@" == *"/mnt/gaming/"* ]]; then
gamingHdd=true
fi
if [[ $GAMING_HDD != 0 && $gamingHdd ]]; 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/"* ]] || [[ "$@" == *"/gamelauncher/"* ]]; then
$command "$@"
elif [[ "$1" == "ulwgl" ]]; then
export GAMEID=123333
cd /home/alex/git/ULWGL/
echo $command ./gamelauncher.sh "$PROTON_PATH" "$EXECUTABLE_PATH" "$ARGUMENTS"
$command ./gamelauncher.sh "$PROTON_PATH" "$EXECUTABLE_PATH" "$ARGUMENTS"
else
export STEAM_COMPAT_CLIENT_INSTALL_PATH=/home/alex/.steam
cd "$1"
wine="wine $2"
if [ "$3" ]; then
wine="$3 $2"
if [ "$3" == "staging" ]; then
wine="/opt/wine-tkg-staging-fsync-git-opt/bin/wine $2"
fi
fi
if [ "$4" != "true" ] && [[ "$wine" != *"proton"* ]]; then
wine="$wine explorer /desktop=Game,${width}x${height} $2"
fi
if [ "$wine" == "proton" ]; then
wine="/home/alex/.local/share/Steam/compatibilitytools.d/GE-Proton7-55/proton run \"$1$2\""
elif [ "$wine" == "proton-exp" ]; then
wine="/home/alex/.local/share/Steam/steamapps/common/Proton\ -\ Experimental/proton run \"$1$2\""
elif [ "$wine" == "proton-6" ]; then
wine="/home/alex/.local/share/Steam/steamapps/common/Proton\ 6.3/proton run \"$1$2\""
elif [ "$wine" == "proton-7" ]; then
wine="/home/alex/.local/share/Steam/steamapps/common/Proton\ 7.0/proton run \"$1$2\""
elif [ "$wine" == "proton-8" ]; then
wine="/home/alex/.local/share/Steam/steamapps/common/Proton\ 8.0/proton run \"$1$2\""
elif [ "$wine" == "proton-ge" ]; then
wine="/home/alex/.local/share/Steam/compatibilitytools.d/GE-Proton9-7/proton run \"$1$2\""
elif [ "$wine" == "proton-ge-13" ]; then
wine="/home/alex/.local/share/Steam/compatibilitytools.d/GE-Proton8-13/proton run \"$1$2\""
elif [ "$wine" == "proton-ge-32" ]; then
wine="/home/alex/.local/share/Steam/compatibilitytools.d/GE-Proton8-32/proton run \"$1$2\""
elif [ "$wine" == "proton-ge-9" ]; then
wine="/home/alex/.local/share/Steam/compatibilitytools.d/GE-Proton9-2/proton run \"$1$2\""
fi
command="$command sh -c '$wine'"
#xfce4-terminal -e "bash -c \"$command\";bash"
echo $wine
echo $command
bash -c "$command"
#sudo killall $(echo $2 | cut -d ' ' -f1)
sleep 2
sudo killall explorer.exe
sudo killall -s 9 winedevice.exe
fi
if [[ $GAMING_HDD != 0 && $gamingHdd ]]; then
output="$(echo -n $(sudo hdparm -S 72 /dev/sda))"
notify-send 'Setze Timeout für Festplatte' "$output" --icon=drive-harddisk
fi