Skip to content

Instantly share code, notes, and snippets.

@Dahlgren
Created May 8, 2015 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dahlgren/72f0465d7ef326a44c78 to your computer and use it in GitHub Desktop.
Save Dahlgren/72f0465d7ef326a44c78 to your computer and use it in GitHub Desktop.
Add support for Automatic Graphics Switching in OSX application
#!/bin/bash
AppName="$1"
defaults write "$AppName/Contents/Info.plist" "NSSupportsAutomaticGraphicsSwitching" -bool true
if [ $? -eq 0 ]; then
chmod 664 "$AppName/Contents/Info.plist"
codesign -f --verbose --deep -s - "$AppName/"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment