This implements https://github.com/ivoronin/TomatoBar/issues/30 . The shortcut is taken from https://github.com/arodik/macos-focus-mode which is under MIT as well, as far as I can tell. I also included the auto-resize commit from https://github.com/ivoronin/TomatoBar/pull/65 to make the popover UI work fine.
If DND toggling is enabled, the user is prompted by Shortcuts.app to install the shortcut the first time the timer is run, and it works normally afterwards. DND.swift is basically taken almost verbatim from the Apple WWDC 21 Shortcuts examples, I've never worked with Swift before so feel free to double check.
This implements https://github.com/ivoronin/TomatoBar/issues/30 . The shortcut is taken from https://github.com/arodik/macos-focus-mode which is under MIT as well, as far as I can tell. I also included the auto-resize commit from https://github.com/ivoronin/TomatoBar/pull/65 to make the popover UI work fine. If DND toggling is enabled, the user is prompted by Shortcuts.app to install the shortcut the first time the timer is run, and it works normally afterwards. DND.swift is basically taken almost verbatim from the Apple WWDC 21 Shortcuts examples, I've never worked with Swift before so feel free to double check.