Skip to content

Instantly share code, notes, and snippets.

@nvllsvm
Created February 16, 2018 05:23
Show Gist options
  • Save nvllsvm/2dfa5b636e42d90b06051821235ad663 to your computer and use it in GitHub Desktop.
Save nvllsvm/2dfa5b636e42d90b06051821235ad663 to your computer and use it in GitHub Desktop.
Wrapper around electron which launches with an appropriate scale factor
#!/bin/sh
dpi=$(xdpyinfo | grep resolution | awk '{print $2}')
if [[ $dpi == '192x192' ]]; then
factor=2
else
factor=1
fi
/usr/bin/electron --force-device-scale-factor=$factor "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment