I'm using this instead: https://gist.github.com/mijorus/b9fabea963fabd435139654c6ebe...

Turn off WiFi when going to sleep, turn it back on on wake.

I don't need my laptop to be doing things when it's in my bag. It's not a phone, unlike what Apple seems to think...

Nice, I might consider forking yours to only do this if the lid is closed, as I leave my laptop open but locked doing things all the time at my desk.

> ioreg -r -k AppleClamshellState -d 4 | grep AppleClamshellState | head -1