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. 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |