26 lines
683 B
Bash
Executable File
26 lines
683 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Source user configuration from ~/.config/environment.d
|
|
set -a
|
|
for i in "${HOME}"/.config/environment.d/*.conf; do
|
|
[[ -f "${i}" ]] && . "${i}"
|
|
done
|
|
set +a
|
|
|
|
# Gamescope parameters
|
|
GAMESCOPE_PARAMS=""
|
|
|
|
# Check if NVK driver is in use
|
|
if vulkaninfo 2>/dev/null | grep -i "driverName" | grep -q "NVK"; then
|
|
# Workaround for https://gitlab.freedesktop.org/mesa/mesa/-/issues/13478
|
|
GAMESCOPE_PARAMS+=" --backend sdl -f"
|
|
fi
|
|
|
|
# Prefer a specific Vulkan adapter if defined
|
|
if [ -n "$VULKAN_ADAPTER" ]; then
|
|
GAMESCOPE_PARAMS+=" --prefer-vk-device $VULKAN_ADAPTER"
|
|
fi
|
|
|
|
# Start client application with Gamescope
|
|
gamescope $GAMESCOPE_PARAMS -- portprotonqt --fullscreen
|