Created
November 26, 2019 10:01
-
-
Save IAmAdamTaylor/7c42c2021f19afb93022066c81cb26b5 to your computer and use it in GitHub Desktop.
App Specific Dark Mode in Mac OS X (Tested on 10.15.1 Catalina)
This file contains 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
lightMode() { | |
if [[ "$#" != 2 ]]; then | |
echo "Must pass exactly 2 arguments." | |
echo "Usage: lightMode <App_Name> <Yes|No>" | |
return 2 | |
fi | |
if [[ "$2" != "Yes" && "$2" != "No" ]]; then | |
echo "2nd argument must be Yes or No." | |
echo "Usage: lightMode <App_Name> <Yes|No>" | |
return 2 | |
fi | |
bid=( $(osascript -e 'id of app "'"$1"'"') ) | |
defaults write $bid NSRequiresAquaSystemAppearance -bool $2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment