#!/usr/bin/env bash set -e ########## # Public ########## export LANG=zh_CN.UTF-8 export XMODIFIERS=@im=fcitx export GTK_IM_MODULE=fcitx export DXVK_HUD='fps,gpuload,cs' ############## # Proton/Wine ############## export PROTONPATH="$HOME/.local/data/proton/default" #export PROTON_ENABLE_WAYLAND=1 #export PROTON_DXVK_GPLASYNC=1 #export WINEARCH=wow64 #export WINEFSYNC=1 #export WINE_FULLSCREEN_FSR=1 #export WINE_CPU_TOPOLOGY='8:0,1,2,3,4,5,6,7' ############# # Gamescope ############# GAMESCOPE_ARGS='-f -W 2560 -H 1440 -r 180 --framerate-limit 180 -S integer --adaptive-sync' GAMESCOPE_CLI="gamescope ${GAMESCOPE_ARGS} --" GAMESCOPE_HDR_CLI="gamescope -O DP-1 --hdr-enabled ${GAMESCOPE_ARGS} --" _RUNTIME_DIR="${XDG_RUNTIME_DIR:-/tmp}/games-runtime" mkdir -p "${_RUNTIME_DIR}"; cd "${_RUNTIME_DIR}" if [[ "$1" = '-i' ]]; then shift export DRI_PRIME=pci-0000_00_02_0 # igpu-intel export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.json export DXVK_HUD="devinfo,${DXVK_HUD}" #else # export DRI_PRIME=pci-0000_03_00_0 # dgpu-amd # export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.json fi case "$1" in hoyo|mi[Hh]o[Yy]o) export WINEPREFIX="$HOME/.local/data/wineprefix/miHoYo" # For GI/ZZZ export WINE_ENABLE_TIMEOUT_FIX=1 export UMU_USE_STEAM=1 case "$2" in 'gih') export GAMEID=umu-gi umu-run 'G:\GenshinImpact\genshin-hdr.exe' -o 1 -m 1000 -s 500 -u 450 DXVK_HDR=1 PROTON_ENABLE_HDR=1 PROTON_ENABLE_WAYLAND=1 \ exec gamemoderun umu-run 'G:\GenshinImpact\ungi.exe' 90 'G:\GenshinImpact\CN\YuanShen.exe' -popupwindow -window-mode borderless ;; 'gi') GAMEID=umu-gi exec gamemoderun umu-run 'G:\GenshinImpact\ungi.exe' 90 'G:\GenshinImpact\CN\YuanShen.exe';; #GAMEID=umu-zzz PROTON_DXVK_LLASYNC=1 \ 'zzz') GAMEID=umu-zzz exec gamemoderun umu-run 'G:\ZenlessZoneZero\CN\ZenlessZoneZero.exe' -use-d3d12;; 'hsr') GAMEID=umu-hsr exec taskset 0xffffff00 umu-run 'G:\HonkaiStarRail\CN\StarRail.exe';; 'wine') shift 2; GAMEID=umu-hoyo exec umu-run "$@";; esac ;; ace) export WINEPREFIX="$HOME/.local/data/wineprefix/ACE" case "$2" in 'taoyuan') GAMEID=umu-taoyuan exec gamemoderun linuwux $GAMESCOPE_CLI umu-run 'G:\Tencent\Taoyuan\launcher\yc_launcher.exe';; 'wine') shift 2; GAMEID=umu-ace exec umu-run "$@";; esac ;; cracks) export WINEPREFIX="$HOME/.local/data/wineprefix/Cracks" case "$2" in 'tf3') GAMEID=umu-tf3 exec gamemoderun umu-run 'G:\TransportFever3\TransportFever3.exe';; 'afterinc') GAMEID=umu-afterinc exec gamemoderun umu-run 'G:\AfterIncRevival\After Inc. Revival.exe';; 'cities2') GAMEID=umu-cities exec gamemoderun umu-run 'G:\CitiesSkylinesII\Cities2.exe';; 'palworld') GAMEID=umu-palworld exec gamemoderun umu-run 'G:\Palworld\Palworld.exe';; 'wine') shift 2; GAMEID=umu-cracks exec umu-run "$@";; esac ;; launchers) export WINEPREFIX="$HOME/.local/data/wineprefix/Launchers" case "$2" in 'mihoyo') GAMEID=umu-hoyolauncher exec umu-run 'C:\Installed\miHoYo Launcher\launcher.exe';; 'hypergryph') GAMEID=umu-hypergryphlauncher exec umu-run 'C:\Installed\Hypergryph Launcher\Launcher.exe';; 'wine') shift 2; GAMEID=umu-launchers exec umu-run "$@";; esac ;; netdisks) export WINEPREFIX="$HOME/.local/data/wineprefix/Netdisks" export DXVK_HUD=0 case "$2" in 'quark') GAMEID=umu-quark exec umu-run 'C:\Installed\QuarkCloudDrive\quark_cloud_drive.exe';; 'wine') shift 2; GAMEID=umu-launchers exec umu-run "$@";; esac ;; esac echo None