Create cs2_resolution.sh
This commit is contained in:
parent
b18d538ad4
commit
e398fd6a5d
1 changed files with 24 additions and 0 deletions
24
.config/scripts/cs2_resolution.sh
Normal file
24
.config/scripts/cs2_resolution.sh
Normal 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"
|
Loading…
Add table
Add a link
Reference in a new issue