

In this second article about Hammerspoon, we look into Spoons, modules written in Lua which can be easily installed and loaded into Hammerspoon to provide ready-to-use functionality. You have a Mac and want to do routine tasks with as little effort as possible Then this book shows you how Hammerspoon can help. Spoons provide a predefined API to configure and use them. They are also a good way to share your own work with other users. Easy to cast, as the weight is concentrated to the. See also the first article in this series. An all-round lure which sends out signals and vibrations in every direction tempting the fish to bite. Using a Spoon to locate your mouseĪs a first example, we will use the MouseCircle spoon, which allows us to set up a hotkey that displays a color circle around the current location of the mouse pointer for a few seconds, to help you locate it. To install the spoon, download its zip file from, unpack it, and double-click on the resulting MouseCircle.spoon file.

Nitris DX and Mojo DX drivers are not signed for Mac OS X 10.9. Hammerspoon will install the Spoon under ~/.hammerspoon/Spoons/. An update to these drivers will be provided that will be signed for installation and will allow the drivers to be un-installed.

It is not possible to un-install the Pro Tools HD drivers, Nitris DX drivers or Mojo DX drivers on Mac OS X 10.9. In most cases, all you need to do is change a directory name, web address, or email address to customize the mini-programs for your purposes. Practical examples serve as a starting point for your own scripts. Type the following in the Hammerspoon console, or add it to your a file and reload the configuration: Once a Spoon is installed, you need to use the hs.loadSpoon() function to load it. Then this book shows you how Hammerspoon can help. Loglevel sets the log level of the logger attribute within the spoon, if it exists. The valid values for this attribute are ‘nothing’, ‘error’, ‘warning’, ‘info’, ‘debug’, or ‘verbose’. hs:command Type in a command string and it will be sent to Hammerspoon directly There is also an external trigger HammerspoonCommand that will pass whatever is sent in the trigger to Hammerspoon using the command processor as in 'hs:command'. Start is a boolean value which indicates whether to call the Spoon’s start() method (if it has one) after configuring everything else.įn specifies a function which will be called with the freshly-loaded Spoon object as its first argument. There is also a hotkey set to this value as an example. This can be used to execute other startup or configuration actions that are not covered by the other attributes.
