https://github.com/bukinoshita/toggle-hotplug
Toggle macOS Sierra hotplug on and off
https://github.com/bukinoshita/toggle-hotplug
hot hotplug image mac macos photos plug sierra
Last synced: about 2 months ago
JSON representation
Toggle macOS Sierra hotplug on and off
- Host: GitHub
- URL: https://github.com/bukinoshita/toggle-hotplug
- Owner: bukinoshita
- License: mit
- Created: 2017-10-16T21:09:26.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T21:50:35.000Z (over 2 years ago)
- Last Synced: 2024-05-02T00:03:02.677Z (about 1 year ago)
- Topics: hot, hotplug, image, mac, macos, photos, plug, sierra
- Language: JavaScript
- Homepage:
- Size: 151 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# toggle-hotplug [](https://travis-ci.org/bukinoshita/toggle-hotplug)
> Toggle macOS Sierra hotplug on and off
_**Hotplug:** when you [plug your iPhone on your macbook and the Photos app automatically opens](https://twitter.com/bukinoshita/status/920089417494220801). `toggle-hotplug` can toggle this on and off._
## Install
```
$ yarn add toggle-hotplug
```## Usage
```js
const { isOn, toggle } = require('toggle-hotplug')await isOn()
// => falseawait toggle()
// => true
```## API
### toggleHotplug
All methods return a `promise`
#### isOn()
Returns a Promise of whether the hotplug is on.
#### toggle()
Inverse the hotplug state.
## Related
- [toggle-hotplug-cli](https://github.com/bukinoshita/toggle-hotplug-cli) — CLI for this module
## License
MIT © [Bu Kinoshita](https://bukinoshita.io)