Apple - Can I toggle Do Not Disturb on/off on my Mac as easily as I can on my iPhone?
Option + Click the menu bar
Actually, there is a Menu Bar icon, of sorts.
To toggle Do Not Disturb you can just hold the option key down while you click on the Notification Centre icon at top right of your Menu Bar.
Doing this will instantly make any visible notifications disappear and grey out the icon. You can still click on it to manually show/hide the Notification Centre whenever you want, but Do Not Disturb stays active.
NOTE: Do Not Disturb will stay active until the next day (when it becomes inactive again) or until you once again hold the option key while clicking on the Notification Centre icon.
Keyboard shortcut
You can also create a keyboard shortcut. To do this:
- Go to Apple > System Preferences...
- Select the Keyboard preference pane
- Select the Shortcuts tab
- In the left-hand pane select Mission Control
- On the right-hand side tick the Turn Do Not Disturb On/Off checkbox
- Now press the keys you want to use for your shortcut (e.g. in the screenshot below I've chosen ⇧⌘D)
- Exit System Preferences
Now you should be able to use that Keyboard shortcut to toggle Do Not Disturb on/off as required.
NOTE: If a keyboard shortcut you've set up doesn't work, then it's most likely already in use for another purpose within macOS. Likewise, if it doesn't work while you're in a particular app, then it may conflict with an app-specific shortcut. In either case you will need to change your shortcut.
Complementing Monomeeth's excellent answer, there's also a toggle button available in the Notification Center in macOS. This is sort of the shortcut (albeit a bit lengthy) you are looking for.
Click on the Notification Center button in the far right on the Menu bar to reveal the Notification Center UI.
Now with the Today tab selected, scroll down to reveal the Do Not Disturb toggle.
Additionally, if you have Hey Siri enabled, you can simply ask Siri to toggle Do Not Disturb.
As well as the answers given, if your Mac has a Touch Bar, you can customise it to include a toggle for Do Not Disturb in the Control Strip which is (nearly) always visible. Of course, you'll have to give up one of the other functions from the Control Strip -- the defaults are brightness, volume, mute and Siri.