Skip to content

Instantly share code, notes, and snippets.

@IAmAdamTaylor
Created November 26, 2019 10:01
Show Gist options
  • Save IAmAdamTaylor/7c42c2021f19afb93022066c81cb26b5 to your computer and use it in GitHub Desktop.
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)
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