Mac: There's all kinds of automation tools on OS X, from the built-in Automator to commercial options like Keyboard Maestro. Hammerspoon's another tool that sits in the same space, but works a little more like something like AutoHotKey. Hammerspoon is built on a Lua scripting engine, and with that, you can create little keyboard shortcut-powered apps to interact with clipboards, location information and windows. For example, you can create your little menubar items or automate different actions depending on your Wi-Fi network. As you'd probably expect from this type of tool, it's pretty dense and requires some effort to get into, but the starter guide provides a good framework to find a good starting point.