From 540b88bfb2ba812d9a9216acbc5c8ec8c5480e84 Mon Sep 17 00:00:00 2001 From: hesam-init Date: Wed, 27 Mar 2024 13:01:36 +0330 Subject: [PATCH] feat: gamescope launch helper --- configs/shell/zsh/.gamescope/pcsx2.sh | 3 ++- configs/shell/zsh/.gamescope/steam.sh | 3 ++- configs/shell/zsh/.gamescope/utils/main.sh | 13 ++++++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/configs/shell/zsh/.gamescope/pcsx2.sh b/configs/shell/zsh/.gamescope/pcsx2.sh index fedceb9..c983f89 100755 --- a/configs/shell/zsh/.gamescope/pcsx2.sh +++ b/configs/shell/zsh/.gamescope/pcsx2.sh @@ -4,7 +4,8 @@ source ~/.gamescope/utils/main.sh source ~/.gamescope/configs.sh run_os() { - MANGOHUD=1 gamescope -W 1920 -H 1080 -f -F fsr -- $PCSX2 -fullscreen -bigpicture + MANGOHUD=1 gamescope -W $WIDTH -H $HEIGHT -f -F fsr --sharpness 15 --xwayland-count 2 -- $PCSX2 -fullscreen -bigpicture } +presetup run_os diff --git a/configs/shell/zsh/.gamescope/steam.sh b/configs/shell/zsh/.gamescope/steam.sh index 0679864..8435b3a 100755 --- a/configs/shell/zsh/.gamescope/steam.sh +++ b/configs/shell/zsh/.gamescope/steam.sh @@ -4,7 +4,8 @@ source ~/.gamescope/utils/main.sh source ~/.gamescope/configs.sh run_os() { - MANGOHUD=1 STEAM_MULTIPLE_XWAYLANDS=1 gamescope -W $WIDTH -H $HEIGHT -r $REFRESH_RATE -e --xwayland-count 2 --adaptive-sync -- steam -gamepadui -steamdeck + MANGOHUD=1 STEAM_MULTIPLE_XWAYLANDS=1 gamescope -e --xwayland-count 2 --adaptive-sync -F fsr -W $WIDTH -H $HEIGHT -r $REFRESH_RATE -- steam -gamepadui -steamdeck } +presetup run_os diff --git a/configs/shell/zsh/.gamescope/utils/main.sh b/configs/shell/zsh/.gamescope/utils/main.sh index 4def6a7..827a67e 100755 --- a/configs/shell/zsh/.gamescope/utils/main.sh +++ b/configs/shell/zsh/.gamescope/utils/main.sh @@ -16,4 +16,15 @@ run_services() { check_and_start "wireplumber" "/usr/bin/wireplumber" } -run_services +check_command() { + if ! command -v $1 &>/dev/null; then + echo "$1 is not installed. Please install $1 to continue." + exit 1 + fi +} + +presetup() { + run_services + check_command "gamescope" + check_command "gamemoderun" +}