Skip to content

launchd – Is there a way to detect power state change from the command line?

  • by
Spread the love


I would like to disable some power hungry services once I disconnect the power cord. Was thinking of creating a launchd agent that can monitor a file and run a script.

If there are other ways of doing this without purchasing a separate app, that would be OK as well. Although, preferred way would be to do it with existing macOS commands.

Leave a Reply

Your email address will not be published. Required fields are marked *