> **Note:** The clickable `.app` searches these known `hs` binary locations automatically: `/opt/homebrew/bin/hs`, `/usr/local/bin/hs`, `/opt/local/bin/hs`, and the Hammerspoon Caskroom path. This is necessary because AppleScript's `do shell script` runs with a minimal PATH that doesn't include your interactive shell's PATH.
Drag "Tile Windows.app" to your Dock. Clicking it tiles the two most-recent windows.
## How it works
- **Focus tracking**: Hammerspoon records every window focus event in a ring (up to 10 recent windows).
- **Tiling**: When triggered (hotkey or click), it grabs the two most-recently-focused *visible* windows and splits the main screen into two halves with a 6px gap between them.
- **Main screen**: Windows are always placed on the screen where the most-recent window currently lives (defaults to the main display).
## Alternative: no .app needed
If you just want the keyboard shortcut `Cmd+Ctrl+T`, skip step 4 — the Hammerspoon config already binds it.