
- Hammerspoon build install#
- Hammerspoon build code#
- Hammerspoon build download#
These objects, act as subscribers when registered with the respective app and notified whenever something important happens inside the app. Triggers and callbacks are user-defined and wrapped inside simple configuration objects. Hellfire works a little something like this: We’ll leverage factory methods to make object creation a breeze)
Configure ` Subscriber` objects (This could be done in a but we will be creating separate files to keep things squeaky clean. Initialise the app with a hotkey binding. You can find the final files for this walkthrough in the hellfred/extend/basics directory on the repository’s basics branch. A url launcher for commonly visited links. We are going to program each app to solve the following scenarios so that you can get the hang of things: Now let’s turn up the heat and configure something a little more useful. Tutorial: A basic setup What we will be programming What Hellfire, Hellfuzz and Hellprompt achieve is map a trigger or input to an action or behaviour, if-this-then-that, and whilst we have just demonstrated using each app to achieve the same outcome, you will find each app more suited to certain use cases than others. Hammerspoon build code#
Hit enter and the code repo for Hellfred will open in a browser. Open Hellprompt with the hotkey shift + ^ + h. Hit enter and the wiki for Hellfred will open in a browser. This highlights the option ‘ Open Hellfred wiki’.
Open Hellfuzz with the hotkey shift + ⌥ + h. The repo for Hellfred will open in a browser. Open Hellfire with the hotkey shift + ⌘ + h. Let’s test it out to make sure everything is wiring and firing.
Out-the-box the 3 Hellfred apps are ready to use and are pre-configured with a quick-start example. What’s in the box? Try out the pre-configuration Save the file and reload the configuration (or save yourself some time and use fancy reload) Let’s reference it in Hammerspoon’s a file. There is a bootstrap file for Hellfred with a pre-configured setup.
Hammerspoon build install#
Install Hellfred: Clone the repository to your ` ~/.hammerspoon ` directory:. command starts with the word ‘ browse’) and behaviour (open url associated with ‘ github’) suitable to open the link. When I type ‘ browse github’ and then hit enter, then execute any function with a filter (e.g. open app associated with ‘ notes’) suitable to open the Notes app. command must start with the word ‘ open’) and behaviour (e.g. When I type the command ‘ open notes’ and then hit enter, then execute any function with a filter (e.g. When I type out a command and submit it, then inspect my command for any matching string patterns and execute functions related to that command. When I fuzzy search through those and select one, Hellfuzz will execute launchOrOpenApp with the selected app.Ī commandline-like utility with basic string matching support. Selecting this option will replace the current choices with Terminal, Notes, and Calendar (the subset of choices for Launch Apps) Alternatively, if I type ‘ app’, then highlight the choice ‘ Launch Apps’. Selecting this option will execute the function openGoogleInBrowser. When I type ‘ goog’, then highlight the choice ‘ Open Google’. When I search through a list of choices and select one, then execute a specific function. If my choice has subchoices (think: parent => children), then show me those so I can search through them. Supports multi-level (nested) choice sets. When I type c then run function centerWindowOnScreen (whilst in WindowManager mode)Ī fuzzy-search chooser utility with choice-to-action mapping. When I type w followed by m then run function changeToWindowManagerMode (again, whilst in Default Mode). When I type c then run function launchGoogleChromeApp (but only if I am in Default Mode). When I type a character or a sequence of characters, then execute a specific function, but only if I am in a particular mode. Modes allow the same trigger to have different behaviours under different contexts. Exposes virtually every key on the keyboard including modifier keys to use as triggers. Supports single key triggers as well as key chord sequences as triggers. Hammerspoon build download#
So you want quick-fire? Skip to the installation and tutorial section below or download the repo and checkout the basics branch.Ī quick-fire, mode-based, hotkey-to-action mapping utility.