Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Wi-Fi Enabler.alfredworkflow

Wi-Fi Enabler Alfred Workflow

Wi-Fi Enabler is a little bash script which 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.

#Léo Derbois (@osxbricks):
#This code permit to swith On/Off Wi-Fi on OSX

interface="en1" #your airport interface
ret=`networksetup -getair
portpower $interface`
if [[ "$ret" == *On* ]]
    networksetup -setairportpower $interface off
    echo "Wi-Fi is Off"
    networksetup -setairportpower $interface on
    echo "Wi-Fi is On"

To use the Alfred workflow just type 'wifi' and it detects if it needs to enable or disable Wi-Fi

You can download directly workflow here and visit OSXBricks for more workflow.

This workflow is made by Léo Derbois.