Last active
November 26, 2019 10:10
-
-
Save IAmAdamTaylor/925750ff0935cad05983f88c2b5b8510 to your computer and use it in GitHub Desktop.
App Specific Dark/Light 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
To use:
$ source ~/.bash_profile
to force it to pick up the new changes$ lightMode Notes No
or$ lightMode Chrome Yes
. For apps with a space in their name you must escape the space, like$ lightMode System\ Preferences Yes
To switch an app back to normal dark mode change the 'Yes' to 'No' when entering the command, like
$ lightMode System\ Preferences No
N.B.
This can probably be used with a Light system appearance to show specific apps in Dark mode, but I haven't looked into this. If you'd like me to, let me know.