brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: Shortcuts on the Mac can start a shortcut when you plug in the charger or join a Wi-Fi network

Shortcuts
~/tips/tip-macos-shortcuts-automation-triggers

Shortcuts app > click a shortcut > Edit > Automation > choose a trigger

Starts a shortcut by itself when an event happens on your Mac, such as plugging in.

For years automations felt like an iPhone thing to me. The Mac version of Shortcuts has them too, and I think they’re one of the more underrated bits of the app: a shortcut that starts itself when something happens on the machine.

You add the trigger to the shortcut itself:

Shortcuts app > click a shortcut > Edit > Automation > choose a trigger

Apple’s list of triggers that can run on their own includes Time of Day, Wi-Fi, Bluetooth, App, Charger, Battery Level, Low Power Mode and Do Not Disturb, plus a few that make more sense on a phone. The Automation item in the sidebar lists every shortcut that has one, and you can filter that list on Turned On or Turned Off.

A practical example: a shortcut that sets up the MacBook for a desk session, triggered by Charger, so it runs when you plug in at home. Or one tied to Wi-Fi that turns on a Focus when you join the office network. I like that the Mac finally reacts to where it is without a third-party app.

Two things to know. By default an automation doesn’t just run: you get a notification asking whether to run it. Apple’s guide describes a privacy option on the shortcut, Allow Running When Locked, that lets some automations run without asking, and then they don’t notify you either. Use that only for shortcuts you trust completely. And automations are specific to a device. They’re backed up to iCloud, but on your other devices the synced copy arrives turned off, so the automation you set up on the Mac won’t suddenly start firing on your iPhone.

Further reading: Apple: Add automations to Shortcuts on Mac, Apple: Intro to shortcuts with automations on Mac

More Shortcuts tips chrome://extensions/shortcuts right click an entry > Show Same Keybindings change the name and icon if you like > Add System Settings > Keyboard > Keyboard Shortcuts > Services Drag MyWorkflow.workflow into the Shortcuts window All Shortcuts tips (8) All topics

Link