Skip to content

Instantly share code, notes, and snippets.

@frangio
Last active December 24, 2017 01:17
Show Gist options
  • Save frangio/575dc804b902f8061a9c03de15e56b0f to your computer and use it in GitHub Desktop.
Save frangio/575dc804b902f8061a9c03de15e56b0f to your computer and use it in GitHub Desktop.
Launch Spotify with automatic DPI scale
#!/usr/bin/env sh
dpi="$(xrdb -query | grep -Fm1 Xft.dpi | cut -f2)"
scale="$((dpi / 96))"
exec "$(which --skip-tilde spotify)" --force-device-scale-factor="$scale"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment