This question got me thinking:

What are all of the settings you could manipulate with the same command-line application, and what are their codes?

Although I don't frequently run low on battery, it would be nice if my Mac automatically set me up for success. I'm running an Early 2015 MacBook Pro 13" Retina (MacBookPro 12,1).

Specifically, I'm looking for the following switches to be made when disconnecting from power while still being able to manually revert whatever I need:

  • Change screen brightness to a specific value (e.g. 20%)
  • Change keyboard backlighting to a specific value
  • Disable screensaver (I have the aerial screensaver installed)
  • Turn Bluetooth off
  • Mute audio
  • Turn location services off (would love to be able to do this per app as well)
  • Pause specific apps (e.g. DropBox, Google Drive, Citrix)
  • Turn on Do Not Disturb (found in original question)

And then of course I would want to switch them all back on when reconnecting to power.

I'm certainly no coder, but I can follow directions, and the application that aaplmath wrote could clearly be expanded. I'm currently downloading Xcode (on a very slow connection), but how would I look these up myself in the future?

  • This myriad of tasks is daunting. What have you tried to accomplish yourself (using Automator, shell scripts, or some other means) to figure this out, but have failed to realize your aims? We're willing to help, but you've got to show us some work. – IconDaemon Mar 16 at 14:33
  • I wasn't able to locate in Automator an activation such as what was built in the original question, something that would detect when the computer is running on battery power. I also far prefer the very clean and self-contained solution as what was presented, rather than a combination of solutions. A Mac OS update could develop competing functions which would leave me chasing down which item I needed to remove/repair. I'm not committed to any one item, rather, I'm trying to find which items are possible in the same application as already created? How was the first found (DND)? – Tony Held Mar 16 at 14:49

You must log in to answer this question.

Browse other questions tagged .