64

GitHub - sindresorhus/do-not-disturb: Control the macOS `Do Not Disturb` feature

 6 years ago
source link: https://github.com/sindresorhus/do-not-disturb
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK