Created
November 17, 2015 14:37
-
-
Save justincampbell/869eb3331dde8ce96663 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
ua=$(defaults read com.apple.universalaccess whiteOnBlack) | |
cg=$(defaults read com.apple.CoreGraphics DisplayUseInvertedPolarity) | |
if [ "$ua" != "$cg" ]; then | |
echo "Values do not match" | |
exit 1 | |
fi | |
if [ "$ua" == "0" ]; then | |
new=1 | |
else | |
new=0 | |
fi | |
set -x | |
defaults write com.apple.universalaccess whiteOnBlack -int $new | |
defaults write com.apple.CoreGraphics DisplayUseInvertedPolarity -int $new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment