Hammerspoon Lua Script – Split Windows 3×3

I’ve been using using Spectacle pretty heavily, but with a larger screen, I always felt like quadrants were a poor use of real estate, so I began to crack open the source code, which was pretty challenging to navigate because it’s a mix of JavaScript and Objective-C reminiscent of user interface programming from ages past. So, I turned next to Hammerspoon.

Hammerspoon¬†uses Lua as a programming interface. I was able to automate moving windows around a 3×3 grid on the current screen with 18 lines of code.