![]() The second argument to bindSpec is the function to call when the key is pressed. bindSpec ( represents pressing Ctrl-⌘-Alt-h. In this case, you can use Cask to install Hammerspoon: If you are automation-minded like me, you probably use Homebrew and its plugin Cask to manage your applications. To install it by hand, you just need to download it from, unzip the downloaded file and drag it to your /Applications folder (or anywhere else you want). Hammerspoon is a regular Mac application. Interested? Let’s get started! Installing Hammerspoon And of course, the configuration is simply Lua code, so you can write your own code to do whatever you want. There is an extensive and growing collection of Spoons, modules written in pure Lua that provide additional functionality and integration. And that is only the libraries that are built into Hammerspoon. Take a quick look at the Hammerspoon API index page to get a feeling of its extensive capabilities. ![]() Some of the lower-level extensions are written in Objective-C, but all of them expose a Lua API, and it is trivial to write your own extensions or modules to extend its functionality.įrom the Hammerspoon configuration you can also execute external commands, run AppleScript or JavaScript code using the OSA scripting framework, establish network connections and even run network servers you can capture and generate keyboard events, detect network changes, USB or audio devices being plugged in or out, changes in screen or keyboard language configuration you can draw directly on the screen to display whatever you want and many other things. It includes extensions for querying and controlling many aspects of the system. Hammerspoon acts as a thin layer between the operating system and a Lua-based configuration language. If you are a programmer, it can make using your Mac vastly more fun and productive. Hammerspoon is the most powerful Mac automation utility I have ever used.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |