Toggle Airport power based on presence of wired ethernet
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


toggleAirport is based on this post:


toggleAirport is a launchd service that toggles Airport power based on the presence of a wired ethernet signal. The assumption is that if you have wired ethernet connected, there is no need to keep the Aiport interface active.

It can also toggle Bluetooth power, but the logic is inverted (Bluetooth turns on when wired ethernet is present). See below for more about Bluetooth.


sudo cp /Library/Scripts
sudo chown root:wheel /Library/Scripts/
sudo chmod 0755 /Library/Scripts/

sudo cp com.tangledhelix.toggleairport.plist /Library/LaunchDaemons
sudo chown root:wheel /Library/LaunchDaemons/com.tangledhelix.toggleairport.plist
sudo chmod 0644 /Library/LaunchDaemons/com.tangledhelix.toggleairport.plist


There are a few settings at the top of

Adjust GROWL as needed to point to your copy of growlnotify.


Change if your interfaces differ from these defaults. These are already correct for all of the MacBooks I have had in recent years.


See below for more on the bluetooth options.


You'll need to activate the service after it's installed.

sudo launchctl load /Library/LaunchDaemons/com.tangledhelix.toggleairport.plist

To deactivate, unload it.

sudo launchctl unload /Library/LaunchDaemons/com.tangledhelix.toggleairport.plist

To deactivate it permanently, first unload, then delete the two files we installed above.

Bluetooth support

If you use a Bluetooth keyboard/mouse or other devices, you can have this service turn Bluetooth off when you are away from your desk (signaled by the lack of wired ethernet). In that case, set BLUETOOTH to yes in

Bluetooth support requires blueutil, found here:

You can also install blueutil via [homebrew][]. If you do that, then set


This is necessary because the syntax for the command changed at some point. The version in homebrew appears to be newer than the version at