agentleFS
servitolaservitola/dotfiles/macos_shortcuts/AGENTS.md

dotfiles / macos_shortcuts

AGENTS.md16 starsChanged 48 days agoMITView on GitHub

Karabiner and Hammerspoon are configured in this repo. Everything else that grabs a key combination stores it in macOS preferences: System Settings shortcuts, an app's own global hotkey (Shottr, Maccy, Itsycal, ChatGPT, …), shortcuts on menu items. shortcuts.toml lists all of them, one row each, so a new Mac gets the same keys and the keyboard lint can see what macOS would swallow before Hammerspoon does. - The Mac is the source, the file follows it. Change a hotkey where…

The file

Files
AGENTS.md

macos_shortcuts — the Mac's hotkeys that live outside this repo, as one file

Karabiner and Hammerspoon are configured in this repo. Everything else that grabs a key combination stores it in macOS preferences: System Settings shortcuts, an app's own global hotkey (Shottr, Maccy, Itsycal, ChatGPT, …), shortcuts on menu items. shortcuts.toml lists all of them, one row each, so a new Mac gets the same keys and the keyboard lint can see what macOS would swallow before Hammerspoon does.

CommandDoes
python3 shortcuts.py capture --writerewrites shortcuts.toml from this Mac. up runs it on every pass
python3 shortcuts.py checkread-only diff, file vs Mac; exit 1 on any difference
python3 shortcuts.py apply [--dry-run]writes the differing rows to the Mac. Install step 17 runs it
python3 shortcuts.py tapswho holds a CoreGraphics event tap on the keyboard
  • The Mac is the source, the file follows it. Change a hotkey where it lives (System Settings, the app), and the next up captures it; commit the diff. Editing the TOML and running apply works too.
  • The key tables follow the file. up then runs docs/keyboard/tools/normalize.py --project, which writes every row with a key into the HotKeys per-key tables as a ⚙ (system) or ◆ (app / menu) line; lint P1 fails when those lines and this file disagree, S4 when a Hammerspoon chord is also an app's hotkey here.
  • Because up captures, running it on a Mac whose hotkeys were never applied rewrites the file with that Mac's state. Run apply (install step 17) there first.
  • Row kinds, chord grammar, app storage formats and what cannot be written (sandboxed apps, Ice, Day One) — the script's docstring and docs/keyboard-setup.md → Machine shortcuts. Chord ↔ keycode conversion is docs/keyboard/keycodes.py.
  • The keyboard lint (docs/keyboard/tools/lint.py, pre-commit) reads this file: S1 — a layout chord is also an enabled system shortcut; S2/S3 — collisions inside the file.
  • Tests: uvx pytest macos_shortcuts/tests — plist fixtures of real app stores, no live Mac needed.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.