Jump to content

Recommended Posts

My first (exported) workflow:

 

Do Not Disturb, Limited - Toggle the macOS Do Not Disturb feature, optionally for a specified length of time.

 

dnd-on-tiny.png.e63a6ba60864e07dd8568f1c1078ee30.png

 

dnd-on-delay-tiny.png.f462e280b54f741e35f65fd126c3f2ef.png

 

dnd-off-tiny.png.b16fde6fd10a24fd24bf314c5458a3ad.png

 

I was really inspired by CalmNotifications but I always forgot to toggle it back. Plus, I really wanted the indicator to reflect the current status, which didn't happen when the "set a plist value and kill NotificationCenter" method is used.

 

Releases | Source

Share this post


Link to post

The timing on this is fun, as just yesterday I was going to turn on Do Not Disturb and thought “did I add a timer to the feature?” (I was thinking of CoffeeCoffee).


I see this method requires setting up a keyboard shortcut. For reference, you can set those up via the command line. I don’t recommend implementing that as part of the Workflow since you shouldn’t be forcing specific shortcuts on user’s machines, but it might be useful to your own setup, or give you an idea to make the process more straightforward (e.g. suggest a shortcut to the user, and auto set it if they agree).

Share this post


Link to post

That is a great tip Vitor! I'm still pretty new to macOS but I'm gathering `defaults` is where a lot of the action is.

 

For workflows with setup, would that typically be another subcomand ("dnd init"), or some kind of dialog on the first run?

Share this post


Link to post
2 hours ago, troycurtisjr said:

but I'm gathering `defaults` is where a lot of the action is.

 

Correct. Though unfortunately, new features tend to not have commands for it. I fear we might even lose some that already exist, with OS upgrades.

 

2 hours ago, troycurtisjr said:

For workflows with setup, would that typically be another subcomand ("dnd init"), or some kind of dialog on the first run?

 

Your choice, but a dialog might be too much. I’d have another command and explain it in the README.

Share this post


Link to post

Trying this out - it does not seem to be moving the toggle in the notifications pane on MacOS - Should it be?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...