64
GitHub - sindresorhus/do-not-disturb: Control the macOS `Do Not Disturb` feature
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
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
- do-not-disturb-cli - CLI for this module
- dark-mode - Control the macOS dark mode
- file-icon - Get the icon of a file or app as a PNG image
- app-path - Get the path to an app
License
MIT © Sindre Sorhus
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK