AutoEjecter - Trigger through Python

AutoEjector runs a Python script in Terminal to check if your MacBook Pro is connected to the AC Power or Battery and ejects external disks on wake. Here is the AutoEjecter script.

There is no real need for Python for this.

You can sue the If Then Else action with a Calculation condition using the BATTERY function, and the Execute a Shell Script action.

Conditional Eject.kmactions (1.2 KB)

1 Like

Thanks. That’s great! My version was a small overnighter because I wanted something quick. I fleshed your version out for myself now with some notifications and Time Machine backupstop shell command.

1 Like