Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FB9264982: Add NSWorkspace API to detect whether Do Not Disturb is enabled #221

Open
sindresorhus opened this issue Jul 5, 2021 · 0 comments

Comments

@sindresorhus
Copy link
Member

  • Date: 2021-07-05
  • Resolution: Open
  • Area: AppKit
  • OS: macOS 11.4.0
  • Type: Suggestion

Description

This can be useful when an app shows its own custom notifications and want to respect the “Do Not Disturb” setting.

For example, one of my apps show a HUD notification (kinda like the volume change indicator), and I would like it to not show if the user has enabled “Do Not Disturb”, so the user can be sure, for example, that nothing interrupts a presentation. I have gotten multiple requests for this from users.

The API would probably be: NSWorkspace.shared.isDoNotDisturbEnabled.
It would be great if this property supported KVO or a separate Combine publisher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant