Control the macOS `Do Not Disturb` feature
Switch branches/tags
Nothing to show
Clone or download
Latest commit 8ee4629 Sep 14, 2018
Permalink
Failed to load latest commit information.
Sources/do-not-disturb Upgrade to Swift 4.2 Sep 14, 2018
.editorconfig Init Mar 10, 2018
.gitattributes Code cleanup Jul 6, 2018
.gitignore Init Mar 10, 2018
.npmrc Init Mar 10, 2018
.travis.yml Upgrade to Swift 4.2 Sep 14, 2018
Package.swift Upgrade to Swift 4.2 Sep 14, 2018
index.js Make it *just work* with Electron and ASAR Mar 12, 2018
license Init Mar 10, 2018
package.json 0.2.0 Mar 12, 2018
readme.md Note in the readme about sandboxing Mar 16, 2018
test.js Make the module async Mar 12, 2018

readme.md

do-not-disturb Build Status

Control the macOS Do Not Disturb feature

Note that this package does not work inside a sandboxed app.

Install

$ npm install @sindresorhus/do-not-disturb

Usage

const doNotDisturb = require('@sindresorhus/do-not-disturb');

(async () => {
	await doNotDisturb.enable();
})();

API

doNotDisturb

All the methods return a Promise. You only really need to await them if you use multiple methods at once.

.enable()

.disable()

.toggle([force])

force

Type: boolean

Force it to be enabled/disabled.

.isEnabled(): Promise<boolean>

Related

License

MIT © Sindre Sorhus