Wi-Fi Enabler Alfred Workflow
Wi-Fi Enabler is a little bash script which permits.to enable/disable Wi-Fi quickly on Mac OS X. This can be useful when your have an Ethernet connection and you want to favorite it.
#!/bin/bash #Léo Derbois (@osxbricks): www.osxbricks.com #This code permit to swith On/Off Wi-Fi on OSX interface="en1" #your airport interface ret=`networksetup -getair portpower $interface` if [[ "$ret" == *On* ]] then networksetup -setairportpower $interface off echo "Wi-Fi is Off" else networksetup -setairportpower $interface on echo "Wi-Fi is On" fi
To use the Alfred workflow just type 'wifi' and it detects if it needs to enable or disable Wi-Fi
This workflow is made by Léo Derbois.