Created
July 22, 2021 17:29
-
-
Save wiedi/9b7e703f765ea14d16bdc28a0b88381a to your computer and use it in GitHub Desktop.
Disable Mac OSX touchbar
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
#!/bin/bash | |
#set -x | |
if [ $# -ne 1 ]; then | |
echo "Usage:" | |
echo -e "\t${0} [on|off]" | |
echo | |
echo "Be sure to disable SIP:" | |
echo " - Reboot" | |
echo " - Hold cmd+R until apple logo shows up" | |
echo " - Open Terminal and run 'csrutil disable'" | |
echo " - Reboot again" | |
exit 0 | |
fi | |
if [[ "$1" == "on" ]]; then | |
defaults delete com.apple.touchbar.agent PresentationModeGlobal; | |
defaults write com.apple.touchbar.agent PresentationModeFnModes '<dict><key>app</key><string>fullControlStrip</string><key>appWithControlStrip</key><string>fullControlStrip</string><key>fullControlStrip</key><string>app</string></dict>'; | |
launchctl load /System/Library/LaunchAgents/com.apple.controlstrip.plist; | |
elif [[ "$1" == "off" ]]; then | |
defaults write com.apple.touchbar.agent PresentationModeGlobal -string fullControlStrip; | |
launchctl unload /System/Library/LaunchAgents/com.apple.controlstrip.plist; | |
else | |
echo "Invalid option" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment