Skip to content

Instantly share code, notes, and snippets.

@ar-lex
Last active June 3, 2023 03:15
Show Gist options
  • Save ar-lex/bb9dabdda4ebe8a376d2e1e2b754dd2f to your computer and use it in GitHub Desktop.
Save ar-lex/bb9dabdda4ebe8a376d2e1e2b754dd2f to your computer and use it in GitHub Desktop.
Wrapper for Steam client to have correct scaling with Plasma Wayland
#!/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