[
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\nindent_style = tab\nend_of_line = lf\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n[*.yml]\nindent_style = space\nindent_size = 2\n"
  },
  {
    "path": ".gitattributes",
    "content": "* text=auto eol=lf\n"
  },
  {
    "path": ".github/workflows/main.yml",
    "content": "name: CI\non:\n  - push\n  - pull_request\njobs:\n  test:\n    name: Node.js ${{ matrix.node-version }}\n    runs-on: macos-latest\n    strategy:\n      fail-fast: false\n      matrix:\n        node-version:\n          - 16\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/setup-node@v2\n        with:\n          node-version: ${{ matrix.node-version }}\n      - run: npm install\n      - run: npm test\n"
  },
  {
    "path": ".gitignore",
    "content": "node_modules\nyarn.lock\n"
  },
  {
    "path": ".npmrc",
    "content": "package-lock=false\n"
  },
  {
    "path": "cli.js",
    "content": "#!/usr/bin/env node\nimport meow from 'meow';\nimport doNotDisturb from '@sindresorhus/do-not-disturb';\n\nconst cli = meow(`\n\tUsage\n\t  $ do-not-disturb <command>\n\n\tCommands\n\t  on\n\t  off\n\t  toggle\n\t  status\n\n\tExamples\n\t  $ do-not-disturb on\n\t  $ do-not-disturb status\n\t  on\n\n\tUse \\`$ dnd\\` to quickly toggle\n`, {\n\timportMeta: import.meta,\n});\n\nconst [command] = cli.input;\n\n(async () => {\n\tswitch (command) {\n\t\tcase 'on':\n\t\t\tawait doNotDisturb.enable();\n\t\t\tbreak;\n\t\tcase 'off':\n\t\t\tawait doNotDisturb.disable();\n\t\t\tbreak;\n\t\tcase 'toggle':\n\t\t\tawait doNotDisturb.toggle();\n\t\t\tbreak;\n\t\tcase 'status':\n\t\t\tconsole.log(await doNotDisturb.isEnabled() ? 'on' : 'off');\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tcli.showHelp();\n\t}\n})();\n\n"
  },
  {
    "path": "dnd.js",
    "content": "#!/usr/bin/env node\nimport meow from 'meow';\nimport doNotDisturb from '@sindresorhus/do-not-disturb';\n\nmeow(`\n\tUsage\n\t  $ dnd\n\n\tToggle \"Do Not Disturb\"\n`, {\n\timportMeta: import.meta,\n});\n\ndoNotDisturb.toggle();\n"
  },
  {
    "path": "license",
    "content": "MIT License\n\nCopyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "package.json",
    "content": "{\n\t\"name\": \"do-not-disturb-cli\",\n\t\"version\": \"1.0.0\",\n\t\"description\": \"Control the macOS `Do Not Disturb` feature from the command-line\",\n\t\"license\": \"MIT\",\n\t\"repository\": \"sindresorhus/do-not-disturb-cli\",\n\t\"funding\": \"https://github.com/sponsors/sindresorhus\",\n\t\"author\": {\n\t\t\"name\": \"Sindre Sorhus\",\n\t\t\"email\": \"sindresorhus@gmail.com\",\n\t\t\"url\": \"https://sindresorhus.com\"\n\t},\n\t\"type\": \"module\",\n\t\"bin\": {\n\t\t\"do-not-disturb\": \"./cli.js\",\n\t\t\"dnd\": \"./dnd.js\"\n\t},\n\t\"engines\": {\n\t\t\"node\": \"^12.20.0 || ^14.13.1 || >=16.0.0\"\n\t},\n\t\"scripts\": {\n\t\t\"test\": \"xo && ava\"\n\t},\n\t\"files\": [\n\t\t\"cli.js\",\n\t\t\"dnd.js\"\n\t],\n\t\"keywords\": [\n\t\t\"cli-app\",\n\t\t\"cli\",\n\t\t\"macos\",\n\t\t\"swift\",\n\t\t\"notifications\"\n\t],\n\t\"dependencies\": {\n\t\t\"@sindresorhus/do-not-disturb\": \"^2.0.0\",\n\t\t\"meow\": \"^10.1.1\"\n\t},\n\t\"devDependencies\": {\n\t\t\"ava\": \"^3.15.0\",\n\t\t\"execa\": \"^5.1.1\",\n\t\t\"xo\": \"^0.45.0\"\n\t}\n}\n"
  },
  {
    "path": "readme.md",
    "content": "# do-not-disturb-cli\n\n> Control the macOS `Do Not Disturb` feature from the command-line\n\n## Install\n\n```sh\nnpm install --global do-not-disturb-cli\n```\n\n## Usage\n\n```\n$ do-not-disturb --help\n\n  Usage\n    $ do-not-disturb <command>\n\n  Commands\n    on\n    off\n    toggle\n    status\n\n  Examples\n    $ do-not-disturb on\n    $ do-not-disturb status\n    on\n\n  Use `$ dnd` to quickly toggle\n```\n\n## Related\n\n- [do-not-disturb](https://github.com/sindresorhus/do-not-disturb) - API for this module\n"
  },
  {
    "path": "test.js",
    "content": "import test from 'ava';\nimport execa from 'execa';\n\ntest('main', async t => {\n\tconst {stdout} = await execa('./cli.js', ['status']);\n\tt.regex(stdout, /on|off/);\n});\n"
  }
]