The name of the Spoon
source, ref and sha256 say where to install the Spoon from, as for hs.spoons.install(). config holds properties to set on the Spoon's object; which ones it reads is up to the Spoon. hotkeys is passed to the Spoon's bindHotkeys(), or "default" passes its defaultHotkeys. fn is called with the Spoon after it's configured. start: true calls its start(). disable: true does nothing at all, which is easier than commenting the call out.
Resolves with the Spoon once it's loaded and configured, or null if disable is true
Load and configure a Spoon in one step, installing it first if it isn't installed yet - the built-in equivalent of Hammerspoon 1's SpoonInstall:andUse().
If the Spoon is already installed, it's loaded and configured before
use()returns, sohs.spoons.<name>can be used on the very next line, and nothing is downloaded. If it isn't installed andsourceis given, it's installed in the background (seehs.spoons.install()), then loaded and configured, and a notification says so; put anything that needs the Spoon infn, or after the returned Promise resolves. An installed Spoon is never updated byuse(): callhs.spoons.update()for that.Configuration is applied after the Spoon is loaded (and its
init()has run), in this order: each property ofconfigis set on the Spoon's object, exactly as if you'd assigned it yourself,hotkeysis passed to itsbindHotkeys()method,fnis called with the Spoon, and finallystart()is called ifstartis true.The Promise rejects with an
Errorwith acode, ashs.spoons.install()'s does, plusENOTINSTALLEDif the Spoon isn't installed and nosourcewas given, or the error thrown by loading or configuring the Spoon.