1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2024-12-28 21:32:36 +01:00

Test gamescope

This commit is contained in:
aclist 2022-10-08 21:12:22 +09:00
parent 4e3f1b40f1
commit 32e42360b1

View file

@ -1,7 +1,7 @@
#!/bin/bash
set -o pipefail
version=2.8.0-rc.20
version=2.8.0-rc.21
aid=221100
game="dayz"
@ -345,21 +345,21 @@ open_mod_links(){
browser "$link_file" 2>/dev/null &
}
#steam_deck_mods(){
# until [[ -z $diff ]]; do
# next=$(echo -e "$diff" | head -n1)
# zenity --question --ok-label="Open" --cancel-label="Cancel" --title="DZGUI" --text="Missing mods. Click [Open] to open mod $next in Steam Workshop and subscribe to it by clicking the green Subscribe button. After the mod is downloaded, return to this menu to continue validation." --width=500 2>/dev/null
# rc=$?
# if [[ $rc -eq 0 ]]; then
# echo "[DZGUI] Opening ${workshop}$next"
# steam steam://url/CommunityFilePage/$next 2>/dev/null &
# zenity --info --title="DZGUI" --ok-label="Next" --text="Click [Next] to continue mod check." --width=500 2>/dev/null
# else
# return 1
# fi
# compare
# done
#}
steam_deck_mods(){
until [[ -z $diff ]]; do
next=$(echo -e "$diff" | head -n1)
zenity --question --ok-label="Open" --cancel-label="Cancel" --title="DZGUI" --text="Missing mods. Click [Open] to open mod $next in Steam Workshop and subscribe to it by clicking the green Subscribe button. After the mod is downloaded, return to this menu to continue validation." --width=500 2>/dev/null
rc=$?
if [[ $rc -eq 0 ]]; then
echo "[DZGUI] Opening ${workshop}$next"
steam steam://url/CommunityFilePage/$next 2>/dev/null &
zenity --info --title="DZGUI" --ok-label="Next" --text="Click [Next] to continue mod check." --width=500 2>/dev/null
else
return 1
fi
compare
done
}
set_term(){
local term="$1"
local tterm="term=\"$term\""
@ -415,7 +415,15 @@ auto_mod_install(){
return 1
fi
}
test_display_mode(){
pgrep -a gamescope | grep -q "generate-drm-mode"
[[ $? -eq 0 ]] && gamemode=1
}
manual_mod_install(){
[[ $is_steam_deck -eq 1 ]] && test_display_mode
if [[ $gamemode -eq 1 ]]; then
steam_deck_mods
else
local ex="/tmp/dzc.tmp"
[[ -f $ex ]] && rm $ex
watcher(){
@ -454,6 +462,7 @@ manual_mod_install(){
else
return 1
fi
fi
}
# if [[ $is_steam_deck -eq 0 ]]; then
# open_mod_links