Skip to content

Instantly share code, notes, and snippets.

@exp111
Created May 16, 2023 15:40
Show Gist options
  • Save exp111/b2b66f182dc64abbb1faed331db1c098 to your computer and use it in GitHub Desktop.
Save exp111/b2b66f182dc64abbb1faed331db1c098 to your computer and use it in GitHub Desktop.
Steam Deck Scripts
#!/bin/bash
touch /tmp/test
while getopts 'i:' OPTION; do
case "$OPTION" in
i)
APPID="$OPTARG"
echo $APPID >> /tmp/test
;;
?)
echo "missing appid" >> /tmp/test
exit 1
;;
esac
done
if [ -z "$APPID" ]; then
echo "missing args" >> /tmp/test
exit 1
fi
/home/deck/scripts/creamApi/SteamDeckCreamApiInstaller $APPID >> /tmp/test
#!/bin/bash
while getopts 'i:' OPTION; do
case "$OPTION" in
i)
APPID="$OPTARG"
;;
?)
echo "missing appid"
exit 1
;;
esac
done
if [ -z "$APPID" ]; then
echo "missing args"
exit 1
fi
cd creamApi/
./SteamDeckCreamApiInstaller $APPID --force
#!/bin/sh
sudo systemctl stop sshd
#!/bin/sh
sudo systemctl start sshd
#!/bin/sh
language="de";
#destination="$HOME";
destination=$(findmnt -n --raw --evaluate --output=target -S /dev/mmcblk0p1) #sd card mount point
romsPath="${destination}/Emulation/roms"
#TODO: error handling if files dont exist? or does sed not care
#TODO: properly switch according to the selected language
#cemu
config=${romsPath}/wiiu/settings.xml
#<console_language>3</console_language>
sed -i \
-e "s/<console_language>.*<\/console_language>/<console_language>3<\/console_language>/g" $config
#cemunative
config=$HOME/.config/Cemu/settings.xml
#<console_language>3</console_language>
sed -i \
-e "s/<console_language>.*<\/console_language>/<console_language>3<\/console_language>/g" $config
#citra
config=$HOME/.var/app/org.citra_emu.citra/config/citra-emu/qt-config.ini
#region_value=2 #region_value\default=false
sed -i \
-e "s/region_value=.*/region_value=2/g" \
-e "s/region_value\\\\default=.*/region_value\\\\default=false/g" $config
#language is directly written to nand TODO: still overwrite by using whitecard dirs?
#dolphin
config=$HOME/.var/app/org.DolphinEmu.dolphin-emu/config/dolphin-emu/Dolphin.ini
#FallbackRegion = 2 #SelectedLanguage = 1
# check if FallbackRegion exists, then add/overwrite depending on result
if grep -q "FallbackRegion" $config; then
sed -i \
-e "s/FallbackRegion = .*/FallbackRegion = 2/g" $config;
else
sed -i \
-e "/^\[Core\]/a\FallbackRegion = 2" $config;
fi
# same for SelectedLanguage
if grep -q "SelectedLanguage" $config; then
sed -i \
-e "s/SelectedLanguage = .*/SelectedLanguage = 1/g" $config;
else
sed -i \
-e "/^\[Core\]/a\SelectedLanguage = 1" $config;
fi
#TODO: is this only for GC? is wii written to nand like the 3ds/citra? can we do smth here
#TODO: duckstation
#TODO: mame
#TODO: pcsx2
#TODO: ppsspp
#TODO: primehack
#TODO: retroarch (?)
#rpcs3
config=$HOME/.var/app/net.rpcs3.RPCS3/config/rpcs3/config.yml
#License Area: SCEE
#Language: German
#Keyboard Type: German keyboard
sed -i \
-e "s/License Area: .*/License Area: SCEE/g" \
-e "s/Language: .*/Language: German/g" \
-e "s/Keyboard Type: .*/Keyboard Type: German keyboard/g" $config
#ryujinx
config=$HOME/.config/Ryujinx/Config.json
#"system_language": "German",
#"system_region": "Europe",
sed -i \
-e 's/"system_language": ".*"/"system_language": "German"/g' \
-e 's/"system_region": ".*"/"system_region": "Europe"/g' $config
#xemu
#None needed
#yuzu
config=$HOME/.config/yuzu/qt-config.ini
#language_index=3
#language_index\default=false
#region_index=2
#region_index\default=false
sed -i \
-e "s/language_index=.*/language_index=3/g" \
-e "s/language_index\\\\default=.*/language_index\\\\default=false/g" \
-e "s/region_index=.*/region_index=2/g" \
-e "s/region_index\\\\default=.*/region_index\\\\default=false/g" $config
wget -O /run/media/mmcblk0p1/Emulation/roms/xbox360/xenia.zip https://github.com/xenia-canary/xenia-canary/releases/latest/download/xenia_canary.zip
unzip -o -d /run/media/mmcblk0p1/Emulation/roms/xbox360/ /run/media/mmcblk0p1/Emulation/roms/xbox360/xenia.zip
meta=$(curl -fSs "https://api.github.com/repos/pineappleEA/pineapple-src/releases")
url=$(echo $meta | jq -r '.[0].assets[] | select(.name|test(".*.AppImage")).browser_download_url')
echo $url
wget -O /home/deck/Applications/yuzu.AppImage $url
source ~/.config/EmuDeck/backend/functions/all.sh
Yuzu_install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment