
- Hammerspoon spoons software license#
- Hammerspoon spoons install#
- Hammerspoon spoons code#
- Hammerspoon spoons download#
The method should accept a single parameter, which is a table. If your Spoon provides actions that a user can map to hotkeys, you should expose a :bindHotKeys() method. you should generally activate them in a :start() method, and de-activate them in a :stop() method Hotkeys timers, watchers, spotlight searches, etc. If your Spoon provides some kind of background activity, e.g. homepage - A URL for the home of your Spoon, e.g.
Hammerspoon spoons software license#
license - The software license that applies to your Spoon, ideally with a link to the text of the license (e.g. author - Your name and optionally your email address You should include at least the following properties on your object: In the :init() method, you should do any work that is necessary to prepare resources for later use, although generally you should not be starting any timers/watchers/etc.

If the object you return has an :init() method, Hammerspoon will call it automatically (although users can override this behaviour, so be sure to document your :init() method). Instead, it should simply prepare an object with methods to be used later, then return the object. You should generally not perform any work, map any hotkeys, start any timers/watchers/etc. When a user calls hs.loadSpoon(), Hammerspoon will load and execute a from the relevant Spoon.

Ultimately a Spoon can be as little as a directory whose name ends. Many Spoons will offer additional API points on top of these, and you should consult their documentation to learn more.
Hammerspoon spoons install#
Hammerspoon will install it for you in ~/.hammerspoon/Spoons/ How do I use a Spoon?

Hammerspoon spoons download#
Simply download one, uncompress it (if your browser hasn't done that part automatically) and double click on the Spoon. The official repository of Spoons is (the source for which can be found at ), but authors may choose to distribute them separately from their own sites.
Hammerspoon spoons code#

Spoons are intended to be pure-Lua plugins for users to use in their Hammerspoon configs.Īs a community, we have created many great configurations for Hammerspoon, but sharing code between them is hard and fragile.
