Skip to content

Instantly share code, notes, and snippets.

@wingrunr21
Created November 5, 2012 22:42
Show Gist options
  • Save wingrunr21/4020893 to your computer and use it in GitHub Desktop.
Save wingrunr21/4020893 to your computer and use it in GitHub Desktop.
Bash script to update the Postbox Info.plist file to support automatic GPU switching
#!/bin/bash
info=/Applications/Postbox.app/Contents/Info.plist
backup=$info.backup
if [[ $1 == "restore" ]]; then
cp $backup $info
exit
fi
sed -i ".backup" '/NSHighResolutionCapable/i \
<key>NSSupportsAutomaticGraphicsSwitching</key> \
<true/> \
' $info
@wingrunr21
Copy link
Author

Install:

curl -fsSkL http://goo.gl/rNrNE | bash

Restore:

curl -fsSkL http://goo.gl/rNrNE | bash -s restore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment