/toggle-hotplug

Toggle macOS Sierra hotplug on and off

Primary LanguageJavaScriptMIT LicenseMIT

toggle-hotplug Build Status

Toggle macOS Sierra hotplug on and off

Hotplug: when you plug your iPhone on your macbook and the Photos app automatically opens. toggle-hotplug can toggle this on and off.

Install

$ yarn add toggle-hotplug

Usage

const { isOn, toggle } = require('toggle-hotplug')

await isOn()
// => false

await 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

License

MIT © Bu Kinoshita