Skip to content

Instantly share code, notes, and snippets.

@Sam0230
Forked from JamesMarino/TouchBar
Last active July 31, 2021 18:31
Show Gist options
  • Save Sam0230/e817c517f51b17bba6561673800cff68 to your computer and use it in GitHub Desktop.
Save Sam0230/e817c517f51b17bba6561673800cff68 to your computer and use it in GitHub Desktop.
Enable or disable the touch bar.
#!/bin/bash
if [ "$1" == "enable" ]; then
launchctl load /System/Library/LaunchDaemons/com.apple.touchbarserver.plist
/usr/libexec/TouchBarServer &
sleep 0.07
killall TouchBarServer
elif [ "$1" == "disable" ]; then
launchctl unload /System/Library/LaunchDaemons/com.apple.touchbarserver.plist
else
echo -e "Usage:\n sudo $0 enable\n sudo $0 disable"
fi
@Sam0230
Copy link
Author

Sam0230 commented Jul 31, 2021

This script works with SIP disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment