Last active
June 3, 2023 03:15
-
-
Save ar-lex/bb9dabdda4ebe8a376d2e1e2b754dd2f to your computer and use it in GitHub Desktop.
Wrapper for Steam client to have correct scaling with Plasma Wayland
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
if [ -z "$GDK_SCALE" ]; then | |
command -v wayland-info > /dev/null 2>&1 | |
if [ $? -ne 0 ]; then | |
export GDK_SCALE=1 | |
else | |
export GDK_SCALE=$(wayland-info | grep scale: | cut -d' ' -f6 | cut -d',' -f1 | sort -r -u | tr '\n' ' ' | cut -d' ' -f1) | |
fi | |
fi | |
exec /usr/bin/steam -forcedesktopscaling=${GDK_SCALE} "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment