mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-02-10 12:40:06 +00:00
24 lines
933 B
Bash
Executable File
24 lines
933 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
|
|
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
|
|
|
|
LAUNCH_OPTIONS=""
|
|
|
|
# If Steam has been launched before we can safely launch with -steamdeck
|
|
# to maintain the gamemode update branch
|
|
if [ -f $HOME/.local/share/Steam/ubuntu12_32/steamui.so ]; then
|
|
LAUNCH_OPTIONS="-steamdeck"
|
|
fi
|
|
|
|
if [[ "$XDG_SESSION_TYPE" == "wayland" ]] && [[ ${BASE_IMAGE_NAME} =~ "kinoite" ]]; then
|
|
# https://github.com/Supreeeme/extest
|
|
# Extest is a drop in replacement for the X11 XTEST extension.
|
|
# It creates a virtual device with the uinput kernel module.
|
|
# It's been primarily developed for allowing the desktop functionality
|
|
# on the Steam Controller to work while Steam is open on Wayland.
|
|
# Also supports Steam Input as a whole.
|
|
env LD_PRELOAD=/usr/lib/extest/libextest.so /usr/bin/steam "$LAUNCH_OPTIONS" "$*"
|
|
else
|
|
/usr/bin/steam "$LAUNCH_OPTIONS" "$*"
|
|
fi |