The following is my attempt at putting together a macro which changes to Low/High Power Mode when my MacBook is plugged/unplugged.
I've used the following resource to write the Shell scripts:
- Enable Low Power Mode on Mac via Command Line by OSXDaily
- sudo command and how to auto get password sudo command and how to auto get password - Ask Ubuntu
Macro doesn't return errors though it does not seem to effective at the moment. Any help much appreciated.
EDIT:
Turns out this is completely redundant as there's a way to achieve the same in System Preferences. Should have just looked better before doing all the research! I suspect the scripts didn't work because System Preferences was taking priority in setting the power modes, thus ignoring the shell commands. I'd still be curios to know the reason!