![]() ![]() If you want to explore the options Hammerspoon offers, check out the Getting Started Guide and the full API documentation. You might want to do something crazy like having iTunes automatically start playing when your Mac detects you are in Paris. You might want to display an alert when your battery drops below a certain percentage. You might want to run a series of commands when your wifi interface connects to your home network. This gets assigned to the fn config parameter in the configuration of the Hammer spoon below, which has the effect of calling the function with the Spoon object as its parameter. You might want to bind a keyboard shortcut to a series of window operations, or an Applescript. Learning Hammerspoon: Getting Started Diego Zamboni 75 subscribers Subscribe 64 Share Save 4K views 2 years ago Unleash the power of automation on your Mac with Hammerspoon With this first. General Hammerspoon utilities The BTTrestartHammerspoon function sets up a BetterTouchTool widget which also executes the configreload action from the spoon. Typically you would write a configuration file in Lua that connects events to actions. You can write Lua code that interacts with OS X APIs for applications, windows, mouse pointers, filesystem objects, audio devices, batteries, screens, low-level keyboard/mouse events, clipboards, location services, wifi, and more. This is very hard to describe succinctly. What gives Hammerspoon its power is a set of extensions that expose specific pieces of system functionality, to the user. At its core, it is just a bridge between the operating system and a Lua scripting engine. Hammerspoon is a tool for powerful automation of OS X.
0 Comments
Leave a Reply. |