Create cs2_resolution.sh

This commit is contained in:
Mylloon 2025-05-12 14:32:15 +02:00
parent b18d538ad4
commit e398fd6a5d
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -o errexit # crash the script when a command crash
set -o pipefail # same as above for piped command
set -o nounset # crash when a variable doesnt exist
# TRACE=1 for debug
if [[ "${TRACE-0}" == "1" ]]; then
set -o xtrace
fi
# Target monitor and resolutions
MONITOR="DP-1"
RES_GAME="1440x1080@144"
RES_NORMAL="1920x1080@144"
# Set gaming resolution
kscreen-doctor output."$MONITOR".mode."$RES_GAME"
# Launch the game
"$@"
# Restore original resolution
kscreen-doctor output."$MONITOR".mode."$RES_NORMAL"