Created
September 28, 2014 15:17
-
-
Save rjeczalik/fdeb702f91f8659dbabf to your computer and use it in GitHub Desktop.
Turns Turbo Boost on/off.
This file contains hidden or 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
#!/usr/env/bash | |
toggle-turbo() { | |
if kextstat | grep DisableTurboBoost &>/dev/null; then | |
for i in {0..6}; do | |
if sudo kextunload /System/Library/Extensions/DisableTurboBoost.kext &>/dev/null; then | |
echo "# toggle-turbo: DisableTurboBoost unloaded" | |
return 0 | |
fi | |
done | |
echo "toggle-turbo: failed to unload DisableTurboBoost" | |
else | |
if sudo kextload /System/Library/Extensions/DisableTurboBoost.kext &>/dev/null; then | |
echo "# toggle-turbo: DisableTurboBoost loaded" | |
return 0 | |
else | |
echo "toggle-turbo: failed to load DisableTurboBoost" | |
fi | |
fi | |
return 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment