HammerspoonEdit

Created , updated

Hammerspoon is a programmable OS X automation and scripting tool. I use it for positioning windows using hot keys and in response to events (eg. plugging in or unplugging an external display, or launching an app).

Why Hammerspoon?

I originally used Stay and Divvy, before discovering the joys of the open source Slate window manager, which allowed me a much higher degree of customization via its JavaScript config file format.

Alas, Slate became abandonware. I continued to use it for a long time; if it ain’t broke, don’t fix it, right? Unfortunately, it was a little bit broken. I had a patch that fixed the main issue I was seeing, but at some point the app started silently crashing for me and I was never able to figure out why.

I looked into the obvious alternatives and was flabbergastered to see them flashing in and out of existence at an alarming rate. Steven Degutis alone has made half a dozen of them — AppGrid, Zephyros, Phoenix, Hydra, Penknife — before finally(?) settling on Mjolnir. Consider this insanely long list of window management tools for OS X. I didn’t want to have to rewrite my extensive Slate config (probably even into another language) if the tool I was targeting was not going to stick around.

In my opinion now, Hammerspoon (itself a fork or Mjolnir, and one which Steven Degutis endorses) has crossed the threshold for community size, active maintenance, and stability that I feel comfortable adopting it, even though it required me to port my Slate configuration from JavaScript to Lua (this is the result). It addresses my main concerns with Mjolnir (doesn’t require me to micromanage a constellation of modules nor bootstrap an entire Lua ecosystem management toolchain, and the documentation is great) and it has plenty of nice features, enabling me to easily attain parity with my Slate set-up and actually exceed it in short order.

Official site