I'm using a MacBook Pro (Retina, Mid-2014) running OS X El Capitan and I'm curious if I can run a script when I close my computer (without installing anything).
Note: I don't want to install anything.
I'm using a MacBook Pro (Retina, Mid-2014) running OS X El Capitan and I'm curious if I can run a script when I close my computer (without installing anything).
Note: I don't want to install anything.
ioreg -r -k AppleClamshellState | grep...
solution by M K doesn't require any installation. – klanomath Mar 03 '16 at 00:23