Daily shortcuts
| ⌘ F | Search native scrollback |
| ⌘ G | Move to the next search result |
| ⌘ ⇧ G | Move to the previous search result |
| ⌘ ⇧ P | Find a terminal by title or working directory |
| ⌘ ⇧ ` | Toggle the scratch terminal while Ghostty is focused |
| ⌘ ⇧ E | Open a complete scrollback export for saving |
| ⌘ Z | Restore a recently closed tab or split |
One-shot split navigation
Press ⌘ ⇧ Space, then one key. Use h, j, k, or l to move; n for a tab; v to split right; or s to split down. Ghostty exits the mode after the action.
Save before quitting
rz --save work # full snapshot with scrollback
rz --save work --no-scrollback # faster snapshot
rz --save work --current-window # only the front Ghostty window
rz --save personal # a separate named workspace
| Measured time | Snapshot |
|---|---|
| about 2.21s | Full snapshot, 8 tabs and 14 surfaces |
| about 1.06s | Fast snapshot without scrollback capture |
Restore after reopening Ghostty
rz # newest snapshot overall
rz --session work # newest snapshot named work
rz --list # inspect available snapshots
rz --session work --dry-run
rz restores window position and size, tabs, terminal counts,
focus, working directories, exact Codex conversation IDs, and any
captured scrollback.
Automatic, without a global service
Start a watcher from the shell that should own it. It saves immediately, then repeats at the requested interval. The watcher uses fast snapshots without scrollback and stops when its owning shell or Ghostty tab exits.
rz --watch backup --every 15m
rz --watch-status
rz --watch-stop
--all-windows only when that broader scope is intentional.
rz --watch backup --every 30m --all-windows
Intervals accept seconds, minutes, or hours, such as 30s,
15m, or 1h, with a ten-second minimum. Watcher
state and logs live in ~/.local/state/ghostty-rz/watchers.
Snapshots accumulate until you remove them; the watcher does not prune
previous backups automatically.
Inspect or repair the live workspace
The launcher claims existing tabs by working directory and creates only missing ones. It does not inject commands into an existing terminal.
Guaranteed read-only preview
osascript ~/dot-files/ghostty/scripts/workspace-open.applescript --dry-run
Ensure declared tabs and print the inventory
osascript ~/dot-files/ghostty/scripts/workspace-open.applescript
osascript ~/dot-files/ghostty/scripts/workspace-inventory.applescript
macOS choices
- Native titlebar tabs and restored window state.
- AppleScript support for inspection and snapshots.
- Exact pixel resizing instead of cell-step resizing.
- Secure-input indication during password entry.
- macOS shortcuts denied so configured Ghostty bindings win.
- An instant scratch terminal at 35% of screen height.
Honest restoration limits
- Ghostty exposes terminal surfaces, not split trees or pane proportions.
- Additional surfaces therefore restore as right-hand splits.
- Scrollback replays as plain text, not as a running process.
- Codex resumes from its conversation ID; arbitrary programs cannot be reconstructed.
- Window geometry needs macOS Accessibility permission for the shell that runs
rz. - A window-scoped snapshot restores that saved window into one new Ghostty window.
Source files
- ghostty/config - commented Ghostty configuration
- ghostty/scripts/rz - snapshot save, selection, and restore
- snapshot-capture.applescript - live Ghostty and scrollback capture
- workspace-open.applescript - idempotent workspace repair
- workspace-inventory.applescript - read-only TSV inventory