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 thelaunchdinstructions once installed.$ brew install sleepwatcher
-
Create
~/.wakeup(and optionally~/.sleep), and make them executable.sleepwatcherwill run these scripts when the machine wakes/sleeps.$ touch ~/.wakeup $ chmod +x ~/.wakeup
-
Copy the contents of
.wakeupto the file you just created above. Edit your Wi-Fi network details (EDIT_WIFI_SSIDandEDIT_WIFI_PASSWORD). The script will make 10 attempts to connect before giving up.