https://github.com/boneskull/mute
A command-line utility to enable or disable "Do Not Disturb" on macOS
https://github.com/boneskull/mute
Last synced: 6 months ago
JSON representation
A command-line utility to enable or disable "Do Not Disturb" on macOS
- Host: GitHub
- URL: https://github.com/boneskull/mute
- Owner: boneskull
- License: mit
- Created: 2018-02-12T22:08:12.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-12T22:22:47.000Z (about 8 years ago)
- Last Synced: 2024-10-29T22:37:13.237Z (over 1 year ago)
- Language: Swift
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mute
> A command-line utility to enable or disable "Do Not Disturb" on macOS
## Motivation
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.
## Install
Given that I don't know anything about code signing, packaging, nor distribution of a macOS app, you're going to have to:
1. Install XCode, etc.
1. Clone this repo and navigate to your working copy
1. Run this to build:
```bash
$ swift build -c release -Xswiftc -static-stdlib
```
1. Copy resulting `.build/release/mute` to somewhere in your `$PATH`, e.g.:
```bash
$ cp .build/release/mute /usr/local/bin/
```
## Usage
### Enable "Do Not Disturb"
```bash
$ mute
```
### Disable "Do Not Disturb"
```bash
$ mute off
```
## Prior Art
- [Building a command line tool using the Swift Package Manager](https://www.swiftbysundell.com/posts/building-a-command-line-tool-using-the-swift-package-manager)
- [Is it possible to turn on/off "do not disturb" for OS X programmatically?](https://stackoverflow.com/questions/25210120/is-it-possible-to-turn-on-off-do-not-disturb-for-os-x-programmatically)
## License
© 2018 Christopher Hiller. Licensed MIT