mirror of
https://oauth2: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@github.com/m1ngsama/deckless.git
synced 2026-05-10 19:11:12 +08:00
33 lines
853 B
Bash
Executable file
33 lines
853 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
config_dir="${XDG_CONFIG_HOME:-$HOME/.config}/deckless"
|
|
settings_env="${DECKLESS_SETTINGS_ENV:-${config_dir}/deckless.env}"
|
|
|
|
if [[ -r "$settings_env" ]]; then
|
|
# shellcheck disable=SC1090
|
|
. "$settings_env"
|
|
fi
|
|
|
|
launcher=(steam -tenfoot)
|
|
|
|
if [[ "${DECKLESS_USE_GAMEMODE:-1}" != '0' ]] && command -v gamemoderun >/dev/null 2>&1; then
|
|
launcher=(gamemoderun "${launcher[@]}")
|
|
fi
|
|
|
|
if [[ "${DECKLESS_USE_GAMESCOPE:-1}" != '0' ]] && command -v gamescope >/dev/null 2>&1; then
|
|
refresh="${DECKLESS_GAMESCOPE_REFRESH:-240}"
|
|
gamescope_args=(-e -f --adaptive-sync)
|
|
|
|
if [[ -n "$refresh" ]]; then
|
|
gamescope_args+=(-r "$refresh")
|
|
fi
|
|
|
|
if [[ "${DECKLESS_USE_MANGOAPP:-1}" != '0' ]]; then
|
|
gamescope_args+=(--mangoapp)
|
|
fi
|
|
|
|
exec gamescope "${gamescope_args[@]}" -- "${launcher[@]}"
|
|
fi
|
|
|
|
exec "${launcher[@]}"
|