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
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