# Hammerspoon pour Mac : automatiser macOS avec des scripts Lua

_As of 2026-11-27_

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

Hammerspoon est un outil d'automatisation gratuit et open source pour macOS. Il met les fenêtres, les raccourcis clavier, le Wi-Fi, les périphériques audio et d'autres éléments du système à la portée de scripts Lua, pour écrire vos propres raccourcis et réactions aux événements.

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/fr/hammerspoon/
