A spoon to load/unload the Turbo Boost Disable kernel extension from https://github.com/rugarciap/Turbo-Boost-Switcher.
Note: this spoon by default uses sudo to load/unload the kernel extension, so for it to work from Hammerspoon, you need to configure sudo to be able to load/unload the extension without a password, or configure the load_kext_cmd and unload_kext_cmd variables to use some other mechanism that prompts you for the credentials.
For example, the following configuration (stored in /etc/sudoers.d/turboboost) can be used to allow loading and unloading the module without a password:
Cmnd_Alias TURBO_OPS = /sbin/kextunload /Applications/Turbo Boost Switcher.app/Contents/Resources/DisableTurboBoost.64bits.kext, /usr/bin/kextutil /Applications/Turbo Boost Switcher.app/Contents/Resources/DisableTurboBoost.64bits.kext
%admin ALL=(ALL) NOPASSWD: TURBO_OPS
If you use this, please support the author of Turbo Boost Disabler by purchasing the Pro version of the app!
Download: https://github.com/Hammerspoon/Spoons/raw/master/Spoons/TurboBoost.spoon.zip
Signature | TurboBoost.check_kext_cmd |
---|---|
Type | Variable |
Description | Command to execute to check whether the DisableTurboBoost kernel extension is loaded. |
Notes |
|
Source | Source/TurboBoost.spoon/init.lua line 100 |
Signature | TurboBoost.disable_on_start |
---|---|
Type | Variable |
Description | Boolean to indicate whether Turbo Boost should be disabled when |
Source | Source/TurboBoost.spoon/init.lua line 45 |
Signature | TurboBoost.disabled_icon_path |
---|---|
Type | Variable |
Description | Where to find the icon to use for the "Disabled" icon. |
Notes |
|
Source | Source/TurboBoost.spoon/init.lua line 121 |
Signature | TurboBoost.enabled_icon_path |
---|---|
Type | Variable |
Description | Where to find the icon to use for the "Enabled" icon. |
Notes |
|
Source | Source/TurboBoost.spoon/init.lua line 113 |
Signature | TurboBoost.kext_path |
---|---|
Type | Variable |
Description | Where the DisableTurboBoost.kext file is located. |
Source | Source/TurboBoost.spoon/init.lua line 67 |
Signature | TurboBoost.kext_paths |
---|---|
Type | Variable |
Description | List with paths to check for the DisableTurboBoost.kext file. The first one |
Source | Source/TurboBoost.spoon/init.lua line 57 |
Signature | TurboBoost.load_kext_cmd |
---|---|
Type | Variable |
Description | Command to execute to load the DisableTurboBoost kernel extension. |
Notes |
|
Source | Source/TurboBoost.spoon/init.lua line 82 |
Signature | TurboBoost.logger |
---|---|
Type | Variable |
Description | Logger object used within the Spoon. Can be accessed to set the default log level for the messages coming from the Spoon. |
Source | Source/TurboBoost.spoon/init.lua line 37 |
Signature | TurboBoost.notify |
---|---|
Type | Variable |
Description | Boolean indicating whether notifications should be generated when Turbo Boost is enabled/disabled. Default value: |
Source | Source/TurboBoost.spoon/init.lua line 108 |
Signature | TurboBoost.reenable_on_stop |
---|---|
Type | Variable |
Description | Boolean to indicate whether Turbo Boost should be reenabled when |
Source | Source/TurboBoost.spoon/init.lua line 51 |
Signature | TurboBoost.unload_kext_cmd |
---|---|
Type | Variable |
Description | Command to execute to unload the DisableTurboBoost kernel extension. |
Notes |
|
Source | Source/TurboBoost.spoon/init.lua line 91 |
Signature | TurboBoost:bindHotkeys(mapping) |
---|---|
Type | Method |
Description | Binds hotkeys for TurboBoost |
Parameters |
|
Returns | |
Source | Source/TurboBoost.spoon/init.lua line 197 |
Signature | TurboBoost:setState(state, notify) |
---|---|
Type | Method |
Description | Sets whether Turbo Boost should be disabled (kernel extension loaded) or enabled (normal state, kernel extension not loaded). |
Parameters |
|
Returns |
|
Source | Source/TurboBoost.spoon/init.lua line 129 |
Signature | TurboBoost:start() |
---|---|
Type | Method |
Description | Starts TurboBoost |
Parameters |
|
Returns |
|
Source | Source/TurboBoost.spoon/init.lua line 209 |
Signature | TurboBoost:status() |
---|---|
Type | Method |
Description | Check whether Turbo Boost is enabled |
Parameters |
|
Returns |
|
Source | Source/TurboBoost.spoon/init.lua line 168 |
Signature | TurboBoost:stop() |
---|---|
Type | Method |
Description | Stops TurboBoost |
Parameters |
|
Returns |
|
Source | Source/TurboBoost.spoon/init.lua line 230 |
Signature | TurboBoost:toggle() |
---|---|
Type | Method |
Description | Toggle TurboBoost status |
Parameters |
|
Returns |
|
Source | Source/TurboBoost.spoon/init.lua line 183 |