feat(gnome): Support DXVK/vkBasalt config file templates on non-deck versions of Bazzite GNOME.

feat(gnome): Add template for MangoHud.conf
This commit is contained in:
Kyle Gospodnetich 2024-06-18 21:29:22 -07:00
parent c313765470
commit 2df9d821e3

View File

@ -17,7 +17,7 @@ BAZZITE_CONFIG_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/bazzite"
mkdir -p "$BAZZITE_CONFIG_DIR"
# SCRIPT VERSION
USER_SETUP_VER=35
USER_SETUP_VER=36
USER_SETUP_VER_FILE="$BAZZITE_CONFIG_DIR/version"
USER_SETUP_FEDORA_VER_FILE="$BAZZITE_CONFIG_DIR/fedora_version"
USER_SETUP_IMAGE_VER_FILE=$BAZZITE_CONFIG_DIR/image_name""
@ -113,24 +113,28 @@ else
fi
fi
echo 'Setting up templates'
TEMPLATES_DIR=$(/usr/bin/xdg-user-dir TEMPLATES || true)
if [[ -z "$TEMPLATES_DIR" || "$TEMPLATES_DIR" == "$HOME" ]]; then
# xdg-user-dir might return only $HOME, in that case, use fallback $HOME/Templates.
echo "Using fallback '$HOME/Templates'"
TEMPLATES_DIR="$HOME/Templates"
fi
mkdir -p "$TEMPLATES_DIR"
if [[ ! -f "$TEMPLATES_DIR/vkBasalt.conf" && -f "/etc/vkBasalt.conf" ]]; then
ln -s "/etc/vkBasalt.conf" "$TEMPLATES_DIR/vkBasalt.conf"
fi
if [[ ! -f "$TEMPLATES_DIR/dxvk.conf" && -f "/etc/dxvk-example.conf" ]]; then
ln -s "/etc/dxvk-example.conf" "$TEMPLATES_DIR/dxvk.conf"
fi
if [[ ! -f "$TEMPLATES_DIR/MangoHud.conf" && -f "/usr/share/doc/mangohud/MangoHud.conf.example" ]]; then
ln -s "/usr/share/doc/mangohud/MangoHud.conf.example" "$TEMPLATES_DIR/MangoHud.conf"
fi
if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegame" ]]; then
echo 'Running setup for Silverblue on Steam Deck'
echo 'Setting up templates'
TEMPLATES_DIR=$(/usr/bin/xdg-user-dir TEMPLATES || true)
if [[ -z "$TEMPLATES_DIR" || "$TEMPLATES_DIR" == "$HOME" ]]; then
# xdg-user-dir might return only $HOME, in that case, use fallback $HOME/Templates.
echo "Using fallback '$HOME/Templates'"
TEMPLATES_DIR="$HOME/Templates"
fi
mkdir -p "$TEMPLATES_DIR"
if [[ ! -f "$TEMPLATES_DIR/vkBasalt.conf" && -f "/etc/vkBasalt.conf" ]]; then
ln -s "/etc/vkBasalt.conf" "$TEMPLATES_DIR/vkBasalt.conf"
fi
if [[ ! -f "$TEMPLATES_DIR/dxvk.conf" && -f "/etc/dxvk-example.conf" ]]; then
ln -s "/etc/dxvk-example.conf" "$TEMPLATES_DIR/dxvk.conf"
fi
echo 'Tweaking GNOME indexer'
if [[ ! -f "$HOME/.steam/.trackerignore" ]]; then
mkdir -p "$HOME/.steam"