Change Mac settings automatically when you unplug the charger
· 6 min read
A MacBook already keeps two sets of power settings, one for battery and one for the power adapter, and switches between them the moment you unplug. Low Power Mode, how soon the display turns off, a slight dimming of the screen and whether the Mac wakes for network access can all differ by power source. Everything else, from the Dock to transparency to sound effects, stays exactly the same wherever you are, unless you add something that watches the power source and switches it for you.
Start with the settings macOS already handles, because they cover most of what matters for battery life.
The settings macOS switches for you
These live in System Settings on macOS Ventura and later. The exact options vary a little by model and macOS version, so an item missing on your Mac is normal rather than a fault.
- Low Power Mode. System Settings, Battery, Low Power Mode, then choose Only on Battery. The Mac trades a little performance and brightness for a longer charge, and turns the mode off again when you plug in.
- Display off timing. System Settings, Lock Screen has two separate settings: Turn display off on battery when inactive, and Turn display off on power adapter when inactive. Set the battery one shorter.
- Slight dimming. In System Settings, Battery, click Options and turn on Slightly dim the display on battery.
- Video streaming. In the same Options sheet, Optimize video streaming while on battery plays HDR video in standard dynamic range to save power.
- Wake for network access. Also under Options, set it to Only on Power Adapter so the Mac does not wake on battery to answer network requests.
Of these, Low Power Mode does the most. The rest are refinements worth a minute of your time once.
What is underneath: pmset profiles
Those switches are the friendly face of pmset, the power management command in Terminal, which keeps a battery profile and a charger profile side by side. To see both:
pmset -g custom
The output has a Battery Power section and an AC Power section. To see which one is in effect right now:
pmset -g batt
Values can be set per profile, with -b for battery and -c for the charger. To turn the display off after three minutes on battery only:
sudo pmset -b displaysleep 3
sudo pmset -b lowpowermode 1 turns on Low Power Mode for battery only, which is the same as the menu choice above. To put every power setting back to Apple’s defaults, run sudo pmset restoredefaults.
The limit is in the name. pmset covers power management: sleep, display sleep, waking, Low Power Mode and similar. It cannot touch the Dock, appearance, sounds or anything else, and there is no equivalent battery profile for those. What defaults write does, and how to undo one safely covers the separate mechanism behind most of those other settings.
What macOS leaves alone
People often expect these to change when they unplug, and none of them do:
- Brightness beyond the slight dim. Automatic brightness responds to the room’s light, not the power source.
- Reduce transparency and reduce motion.
- Wi-Fi and Bluetooth.
- The Dock, window animations and screenshot settings.
- Sound effects and alert volume.
- Focus. A Focus schedule can start by time, location or app, but not by power source.
- How quickly the Mac asks for a password after sleep.
If you want any of these to differ away from the desk, you either change them by hand each time or use something that watches the power source.
What is actually worth changing on battery
Be honest with yourself about the goal here. If it is battery life, screen brightness and what your apps are doing account for most of the drain. Open Activity Monitor, choose the Energy tab and sort by Energy Impact. A web page playing video in a background tab, or an app stuck working on something, costs more than any visual setting. Turning off transparency and animations saves a little at best; do it because you prefer the calmer look, not as a battery trick. Reduce transparency and motion covers both.
The better reason to switch settings on battery is where you are likely to be. Unplugged usually means a train, a cafe, a meeting room or someone else’s desk. That suggests a different set of changes:
- Password immediately after sleep, because a laptop on battery is more likely to be somewhere public. Require a password immediately after a Mac sleeps explains the setting.
- Silence the interface sounds, so emptying the Trash in a quiet library does not announce itself. See turn off the sound effects a Mac plays.
- Hide what the Dock shows, if you present from the laptop away from your desk. Switch a Mac between work, focus and presentation setups walks through a presentation set by hand.
Switching the rest in one move
Mainspring fills the gap macOS leaves. It turns hidden and scattered macOS settings into plain-English power-ups, and lets you build a scene from any mix of them. A scene can apply itself on a trigger such as unplugging power, so a Battery scene might turn on password on sleep, silence UI sounds, reduce transparency and switch off window animations the moment the cable comes out. A second scene for the desk puts your usual setup back in a click.
Every power-up is a real macOS setting, and Mainspring snapshots the old value before it changes anything, so none of this is a one-way trip. It runs on macOS 13 Ventura or later, with a free one-day trial that includes every feature. Keep Low Power Mode and display sleep in macOS’s own Battery and Lock Screen settings, which already switch them well; use scenes for everything else.
Questions
Does Low Power Mode make a Mac noticeably slower? For writing, email and browsing, most people do not notice. Heavy work such as exporting video or compiling code takes longer, which is why Only on Battery is a sensible middle ground rather than Always.
Can a Focus turn on by itself when I unplug? Not with the built-in schedules, which start a Focus by time, location or app. You can turn one on by hand from Control Center when you leave your desk.
How do I undo a pmset change?
Run the same command with the old value, or sudo pmset restoredefaults to put every power setting back to Apple’s defaults. pmset -g custom shows what is set now.