cloudconfversion="1.0" # NOTE: These parameters are focused on chromium-based web browsers. # They may not all apply to other browsers and manually changing could break the scripts. # # # Run parameters for flatpak launch # BROWSERAPP="com.google.Chrome" # FLATPAKOPTIONS="\ --branch=stable \ --arch=x86_64 \ --file-forwarding \ " # # # # # Launch parameters passed to flatpak app # # Default (Steam Deck Game Mode): 1024,640 WINDOWSIZE="1024,640" # Default (Steam Deck Game Mode): 1.25 # NOTE: This is used for "force-device-scale-factor" and "device-scale-factor" DEVICESCALEFACTOR="1.25" # Browser modes (--kiosk, --start-fullscreen): MODE="--kiosk" # BROWSEROPTIONS="\ --window-size=${WINDOWSIZE} \ --force-device-scale-factor=${DEVICESCALEFACTOR} \ --device-scale-factor=${DEVICESCALEFACTOR} \ ${MODE} \ " # prevent possible LD_PRELOAD entries from steam being passed to browser LD_PRELOAD="" browsercommand() { { # try flatpak with specified browserapp "/usr/bin/flatpak" run ${FLATPAKOPTIONS} ${BROWSERAPP} @@u @@ ${BROWSEROPTIONS} ${LINK} } || { # if that fails, try running the browserapp natively ${BROWSERAPP} ${BROWSEROPTIONS} ${LINK} } || { # if browserapp fails, try looking up and using default browser given by xdg-settings DEFAULTBROWSERAPP=$(cat /usr/share/applications/"$(xdg-settings get default-web-browser)" | grep Exec= | head -n 1 | cut -d = -f 2 | cut -d " " -f1) ${DEFAULTBROWSERAPP} ${BROWSEROPTIONS} ${LINK} } }