# Hammerspoon para Mac: automatiza macOS con scripts en Lua

_As of 2026-11-27_

- **Version:** 1.1.1
- **macOS min:** 13
- **License:** Free

Hammerspoon es una herramienta de automatización gratuita y de código abierto para macOS. Pone ventanas, atajos de teclado, Wi-Fi, dispositivos de audio y otras partes del sistema al alcance de scripts en Lua, para que escribas tus propios atajos y reacciones a eventos.

Hammerspoon is a bridge between macOS and a scripting language. On its own it does nothing; a few lines of Lua let it move windows with a hotkey, react when your Mac joins a Wi-Fi network or warn you when the battery runs low.
What it does well

Hotkeys. Bind any key combination to a function that moves and resizes windows, launches apps or runs AppleScript.
Events. Scripts can react to a Wi-Fi network change, a USB device being plugged in, the battery level or a changed file.
Spoons. Ready-made plugins that you download, open to install, and load with a line of configuration.
Console and reload. A built-in console runs Lua interactively, and the configuration reloads without restarting the app.

Who it is for
People comfortable with a little code who want automation that ready-made tools do not offer.
Good to know
The Lua version offered here is no longer maintained; its maintainer now works on Hammerspoon 2, a separate app scripted in JavaScript that is still in beta. If you prefer clicking to coding, BetterTouchTool covers hotkeys, gestures and window actions in a settings window.
How to install

Unzip the download if your browser has not done it already.
Drag Hammerspoon to Applications.
The first time you open it, macOS asks you to confirm an app downloaded from the internet; click Open.
Grant access in System Settings → Privacy &amp; Security → Accessibility, then write your first script in ~/.hammerspoon/init.lua.

> Source: https://macsoftpark.net/es/hammerspoon/
