A command-line utility to enable or disable "Do Not Disturb" on macOS
I want to automatically toggle "Do Not Disturb" at multiple times during the day. macOS' System Preferences does provide for this. I can couple this with user agents via launchd.
Also I wanted to try to do something with swift. It's pretty cool, but Core Foundation isn't.
Given that I don't know anything about code signing, packaging, nor distribution of a macOS app, you're going to have to:
-
Install XCode, etc.
-
Clone this repo and navigate to your working copy
-
Run this to build:
$ swift build -c release -Xswiftc -static-stdlib
-
Copy resulting
.build/release/muteto somewhere in your$PATH, e.g.:$ cp .build/release/mute /usr/local/bin/
$ mute$ mute off- Building a command line tool using the Swift Package Manager
- Is it possible to turn on/off "do not disturb" for OS X programmatically?
© 2018 Christopher Hiller. Licensed MIT