The name of the Spoon
Optionaloptions: {How to install, load and configure the Spoon
Optionalconfig?: Record<string, any>Properties to set on the Spoon's object; which ones it reads is up to the Spoon
Optionaldisable?: booleantrue does nothing at all, which is easier than commenting the call out
Optionalfn?: (spoon: Object) => voidCalled with the Spoon after it's configured
Optionalhotkeys?: "default" | Record<string, any>Passed to the Spoon's bindHotkeys(), or "default" passes its defaultHotkeys
Optionalpath?: stringA directory to load the Spoon from instead (relative to your config directory), as for hs.spoons.load(). Takes precedence over source, ref and sha256
Optionalref?: stringThe branch, tag or commit to install from, as for hs.spoons.install()
Optionalsha256?: stringThe expected SHA-256 of the download, as for hs.spoons.install()
Optionalsource?: stringWhere to install the Spoon from if it isn't installed, as for hs.spoons.install()
Optionalstart?: booleantrue calls the Spoon's start() last
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.pathloads the Spoon from a directory of your own instead, ashs.spoons.load()does, for developing a Spoon: nothing is installed, and an installed copy is ignored. It takes precedence oversource,refandsha256, which are ignored while it's given, so a config can keep itssourcefor everyone else and addpathwhile you work on the Spoon.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.