When Bluetooth is enabled, my Macbook Air loses its Wi-Fi connection when it goes to sleep (see Issue #2 here). I often have to scan for my home network and manually reconnect, so this is quicky and dirty solution to reconnect to my Wi-Fi network when the machine wakes up.
-
Install SleepWatcher using
brew
. Make sure to follow thelaunchd
instructions once installed.$ brew install sleepwatcher
-
Create
~/.wakeup
(and optionally~/.sleep
), and make them executable.sleepwatcher
will run these scripts when the machine wakes/sleeps.$ touch ~/.wakeup $ chmod +x ~/.wakeup
-
Copy the contents of
.wakeup
to the file you just created above. Edit your Wi-Fi network details (EDIT_WIFI_SSID
andEDIT_WIFI_PASSWORD
). The script will make 10 attempts to connect before giving up.