devzhr / toggleairport

A script for macOS to turn off WiFi when Ethernet is plugged in, and turn on WiFi when Ethernet is unplugged

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The credit for most of the code belongs to others including https://gist.github.com/albertbori/1798d88a93175b9da00b

This program turns off WiFi when it detects a wired ethernet connection and turns on WiFi when the ethernet is unplugged.

For Catalina and later

Tested on Catalina

git clone https://github.com/Calvin-LL/toggleairport.git
cd toggleairport
./install.sh

to uninstall just do

./uninstall.sh

For pre Catalina

(or if the Catalina version didn't work for you)

git clone --branch pre_catalina https://github.com/Calvin-LL/toggleairport.git
cd toggleairport
./install.sh

to uninstall just do

./uninstall.sh

Do not run either of the scripts with sudo, if you do, notifications will not display.

About

A script for macOS to turn off WiFi when Ethernet is plugged in, and turn on WiFi when Ethernet is unplugged


Languages

Language:Shell 100.0%