Hammerspoon

 Hammerspoon  is a tool for powerful automation of macOS that lets users perform actions using Lua scripts, including deep integration with the operating system.