Lua for all the things on your mac v1

1 min read

One thing people really like about OSX is that everything works and is easy to use, but what is easy is not necessarily the best for your particular usecase.

Hammerspoon

This especially becomes important when it comes down to configurability / scriptablity. For my own purposes I use Hammerspoon which provides Lua wrappers for quite a lot of lower level APIs, so its easy to setup things a specific way.

Just a quick list of what you can do with it:

  • Define a grid layout bound to application names: Left the Browser, right the IDE and shell.
  • Apply this grid using a shortcut
  • React to changing wlan SSIDs:
    • Start your location audio device
    • Enable a VPN automatically
  • Provide a shortcut to toggle apps to fullscreen

My own variant but the Wiki provides a lot of more ideas.