docs(docs): expand terminal and tmux documentation with launch commands, prompts, persistence, and keybinding updates

This commit is contained in:
Prad Nukala committed 2026-10-08 11:29:11 -04:00
1 parent ce9886c2e7
commit 9e227b416d
10 files changed
+106 -76

No files matched your search

+36 -26
View File
@@ -1,9 +1,9 @@
---
title: Ghostty
description: Ghostty configuration and its herdr key sync.
description: Ghostty as a tmux-only terminal — every window attaches to tmux, and ctrl+shift chords drive tmux.
---
GPU terminal emulator kept alongside kitty. Its bindings send the same herdr prefix bytes as the kitty herdr host.
Ghostty is only a [tmux](/terminal/tmux) client. tmux owns tabs (windows), splits (panes), sessions, and persistence. Ghostty draws the text and handles the clipboard and font size.
| | |
| --- | --- |
@@ -17,47 +17,57 @@ Ghostty reads both `config` and `config.ghostty`. `config` holds all settings; `
| Option | Value |
| --- | --- |
| `font-family` / `font-size` | `Victor Mono NF` / `13` |
| `font-family` / `font-size` | `IoskeleyMonoTerm Nerd Font Mono` / `11` |
| `adjust-cell-height` | `20%` (line height) |
| `background-opacity` / `background-blur` | `0.9` / `true` |
| `window-decoration` | `false`; `gtk-titlebar = false` |
| `window-padding-x/y` | `0` (bezelless: text runs to the window edge) |
| `window-padding-x/y` | `2` |
| `cursor-style` | `underline`, blinking |
| `scrollback-limit` | `3023` |
| `scrollback-limit` | `3023` (tmux keeps the real scrollback: `history-limit 50000`) |
| `mouse-hide-while-typing` | `true` |
| `copy-on-select` | `false` |
| `confirm-close-surface` | `false` |
| `app-notifications` | `no-clipboard-copy,no-config-reload` |
| `quit-after-last-window-closed` | `false`, delay `5m` |
| `command` | `tmux new-session -A -s main` (every window and tab attaches to tmux session `main`, creating it when missing) |
| `command` | `tmux new-session -A -s main`: every window attaches to tmux session `main` and creates it if it is missing |
| `shell-integration` | `detect`, features `cursor,sudo,title,no-cursor` |
| `gtk-single-instance` | `true` |
## Persistence
Closing Ghostty only detaches from tmux; the shells keep running in the tmux server. Across reboots, tmux-continuum saves the layout every 10 minutes. When the first Ghostty window starts a new tmux server, continuum restores the last save. See [tmux](/terminal/tmux#persistence).
## Keybindings
| Key | Action |
`keybind = clear` comes first and drops every Ghostty default: tabs, splits, `alt+N` goto_tab, and `ctrl+alt+arrow` goto_split. Those chords then reach tmux, which binds `alt+1…9` and `ctrl+alt+arrows` itself. Each `ctrl+shift` chord sends tmux's second prefix, `ctrl+b` (`\x02`), followed by a key.
| Key | Ghostty action |
| --- | --- |
| `cmd+c` / `cmd+v` | Copy / paste |
| `cmd+n` | New window |
| `ctrl+shift+c` / `ctrl+shift+v` | Copy / paste |
| `ctrl+plus` / `ctrl+minus` / `ctrl+zero` | Font size +1 / -1 / reset |
| `ctrl+shift+.` | Reload Ghostty config |
| `shift+enter` | Sends a literal newline |
| `ctrl+shift+alt+,` | Reload config |
### herdr sync
Placed last so they override defaults. Each sends `ctrl+b` (`\x02`) followed by a key; see [herdr](/terminal/herdr).
| Key | Sends |
| --- | --- |
| `ctrl+shift+n` | `prefix %` (split vertical) |
| `ctrl+shift+t` | `prefix c` |
| `ctrl+tab` / `ctrl+shift+tab` | `prefix n` / `prefix p` |
| `ctrl+shift+f` | `prefix s` (workspace picker) |
| `ctrl+shift+l` / `ctrl+shift+h` | `prefix .` / `prefix ,` (next / previous agent) |
| `ctrl+shift+j` / `ctrl+shift+k` | `prefix j` / `prefix k` (next / previous workspace) |
| `super+enter` | `prefix N` |
| `super+r` | `prefix W` |
| `ctrl+shift+r` | `prefix T` |
| `ctrl+shift+,` | `prefix S` (herdr settings) |
| Key | Sends | tmux action |
| --- | --- | --- |
| `ctrl+shift+t` | `prefix c` | New window (tab) in pane cwd |
| `ctrl+shift+w` | `prefix k` | Kill window (close tab) |
| `ctrl+shift+r` | `prefix r` | Rename window |
| `ctrl+tab` / `ctrl+page_down` / `ctrl+shift+right` / `ctrl+shift+k` | `prefix n` | Next window |
| `ctrl+shift+tab` / `ctrl+page_up` / `ctrl+shift+left` / `ctrl+shift+h` | `prefix p` | Previous window |
| `ctrl+shift+l` | `prefix v` | Split right |
| `ctrl+shift+e` / `ctrl+shift+j` | `prefix h` | Split below |
| `ctrl+shift+o` | `prefix o` | Session picker (tmux-sessionx) |
| `ctrl+shift+x` | `prefix x` | Kill pane |
| `ctrl+shift+enter` / `ctrl+shift+z` | `prefix z` | Zoom pane |
| `ctrl+shift+f` | `prefix /` | Search scrollback upward |
| `ctrl+shift+page_up` | `prefix [` | Copy mode |
| `ctrl+shift+p` | `prefix :` | Command prompt |
| `ctrl+shift+/` | `prefix ?` | Keybinding help popup |
| `ctrl+shift+alt+,` | `prefix q` | Reload tmux config |
| `ctrl+shift+n` | `prefix C` | New session |
| `ctrl+shift+s` | `prefix s` | Session/window tree |
| `ctrl+shift+q` | `prefix d` | Detach (closes the Ghostty window; the session lives on) |
## Themes
+1 -1
View File
@@ -10,7 +10,7 @@ herdr is a terminal multiplexer with workspaces, tabs and panes, a sidebar, a pr
| Source | `dot_config/herdr/config.toml`, `dot_config/herdr/plugins.json`, `dot_config/herdr/plugins/config/`, `dot_config/herdr/empty_dot_plugins.lock`, `dot_config/herdr/kitty.conf`, `dot_config/herdr-nvim/config.toml` |
| Target | `~/.config/herdr/`, `~/.config/herdr-nvim/config.toml` |
| Install | Not in `packages.yaml`; updated by topgrade (`herdr update`) |
| Launch | kitty `super+a` (see [kitty](/terminal/kitty)); Ghostty keys send the same prefix bytes |
| Launch | kitty `super+a` (see [kitty](/terminal/kitty)) |
## config.toml
+3 -3
View File
@@ -5,13 +5,13 @@ sidebar:
label: Overview
---
kitty is the primary terminal. It runs in three modes: plain kitty (kitty owns splits and tabs), a tmux host, and a herdr host. Ghostty is kept as a secondary terminal whose bindings drive herdr the same way.
kitty is the primary terminal. It runs in three modes: plain kitty (kitty owns splits and tabs), a tmux host, and a herdr host. Ghostty is a tmux-only terminal: every window attaches to tmux, and its `ctrl+shift` chords drive tmux.
| Page | Source | What it covers |
| --- | --- | --- |
| [kitty](/terminal/kitty) | `dot_config/kitty/` | Main config, host configs (tmux, herdr, goliath), kittens, custom tab bar |
| [Ghostty](/terminal/ghostty) | `dot_config/ghostty/` | Config, herdr key sync, themes |
| [tmux](/terminal/tmux) | `dot_config/tmux/` | Prefix, bindings, tpm plugins, dotbar status line, Niri titles |
| [Ghostty](/terminal/ghostty) | `dot_config/ghostty/` | tmux-only terminal: ctrl+shift chords → tmux, themes |
| [tmux](/terminal/tmux) | `dot_config/tmux/` | Prefix, bindings, kitty-style tabs with Nerd Font icons, resurrect/continuum persistence, Niri titles |
| [herdr](/terminal/herdr) | `dot_config/herdr/`, `dot_config/herdr-nvim/` | Agent-aware multiplexer: keys, theme, plugins, Claude hook |
## Shared conventions
+1 -1
View File
@@ -160,7 +160,7 @@ Launched by `super+t`. kitty stays a dumb terminal; tmux owns panes, windows and
### herdr.conf — kitty as a herdr host
Launched by `super+a`. Class `kitty-herdr`, `tab_bar_style hidden` (herdr draws its own sidebar and tab strip), `shell herdr` (launches or attaches the persistent session; closing the window detaches). Base appearance matches `kitty.conf`, without a `listen_on`. Keys mirror the [Ghostty](/terminal/ghostty) config so both drive herdr identically; an uppercase letter after `\x02` is the shift variant. See [herdr](/terminal/herdr).
Launched by `super+a`. Class `kitty-herdr`, `tab_bar_style hidden` (herdr draws its own sidebar and tab strip), `shell herdr` (launches or attaches the persistent session; closing the window detaches). Base appearance matches `kitty.conf`, without a `listen_on`. An uppercase letter after `\x02` is the shift variant. See [herdr](/terminal/herdr).
| Key | Sends / does |
| --- | --- |
+57 -40
View File
@@ -1,62 +1,75 @@
---
title: tmux
description: tmux prefix, options, bindings, tpm plugins and the dotbar status line.
description: tmux prefix, bindings, kitty-style window tabs with Nerd Font icons, and resurrect/continuum persistence.
---
Terminal multiplexer. Used locally through the kitty tmux host (`super+t` in [kitty](/terminal/kitty)) and remotely on goliath.
Terminal multiplexer. [Ghostty](/terminal/ghostty) runs nothing but tmux, and Ghostty's `ctrl+shift` chords are tmux bindings. tmux is also used through the kitty tmux host and remotely on goliath.
| | |
| --- | --- |
| Source | `dot_config/tmux/tmux.conf`, `dot_config/tmux/tmux-nerd-font-window-name.yml`, `dot_config/tmux/executable_niri-title.sh` |
| Target | `~/.config/tmux/` |
| Source | `dot_config/tmux/tmux.conf`, `dot_config/tmux/tmux-nerd-font-window-name.yml`, `dot_config/tmux/executable_tab-label.sh`, `dot_config/tmux/executable_niri-title.sh`, `dot_config/omarchy/themed/tmux.conf.tpl`, `dot_config/omarchy/hooks/theme-set.d/executable_tmux-tabs` |
| Target | `~/.config/tmux/`, `~/.config/omarchy/` |
| Install | `tmux` in `.chezmoidata/packages.yaml` (pacman, brew) |
tpm is a `git-repo` external in `.chezmoiexternal.toml`, cloned to `~/.config/tmux/plugins/tpm` when missing. `tmux.conf` ends with `run '~/.config/tmux/plugins/tpm/tpm'`. Plugins tpm installs (`prefix I`) land next to it and are ignored by chezmoi. [Ghostty](/terminal/ghostty) starts every surface in `tmux new-session -A -s main`.
tpm is a `git-repo` external in `.chezmoiexternal.toml`, cloned to `~/.config/tmux/plugins/tpm` when missing. `tmux.conf` ends with `run '~/.config/tmux/plugins/tpm/tpm'`. Plugins installed by tpm (`prefix I`) land next to it and are ignored by chezmoi.
## Options
The prefix is the default `ctrl+b`.
The prefix is `ctrl+space`; `ctrl+b` is `prefix2` (the byte Ghostty sends).
| Option | Value |
| --- | --- |
| `default-terminal` | `tmux-256color`; `xterm-kitty:Tc` override; features `RGB:usstyle:hyperlinks:clipboard:extkeys` |
| `extended-keys` | `always`, format `csi-u` |
| `default-terminal` | `tmux-256color`; `RGB` override for every terminal; `clipboard` feature; `extkeys` for xterm-kitty |
| `extended-keys` | `on`, format `csi-u` |
| `base-index` / `pane-base-index` | `1` / `1`; `renumber-windows on` |
| `status-position` | `top` |
| `allow-passthrough` | `on` (kitty graphics for yazi previews); `TERM`, `TERM_PROGRAM` added to `update-environment` |
| `set-clipboard` | `on` (OSC 52) |
| `mouse` | `on` |
| `status-position` | `top`, `status-interval 5` |
| `allow-passthrough` / `set-clipboard` / `mouse` / `focus-events` | `on` |
| `update-environment` | `TERM` and `TERM_PROGRAM` appended, so programs see the outer terminal (Ghostty/kitty) |
| `mode-keys` | `vi` |
| `set-titles` | `on`, `set-titles-string "#T (#S)"`, `status-interval 1`, `automatic-rename on` |
| `set-titles` | `on`, `#h:#W` |
| `automatic-rename-format` | `#{window_icon} <label>`: Nerd Font icon, then the dynamic label described under [Window tabs](#window-tabs) |
| `history-limit` | `50000` |
| Styling | `status-style` and `popup-style` use default bg; popup border rounded, `fg=#5c5c66` |
| `detach-on-destroy` | `off` (killing a session switches to another instead of detaching) |
These settings are what [yazi](/tools/yazi) needs inside tmux. `allow-passthrough` carries image previews through to the terminal, `set-clipboard` copies paths via OSC 52, and the two environment variables let yazi detect the outer terminal's graphics support. Nothing binds `M-[`: tmux would read the `ESC [` that starts yazi's terminal-query replies as that key and break yazi's capability detection.
## Keybindings
| Key | Action |
| --- | --- |
| `S-Enter` (no prefix) | Sends `Esc [13;2u` |
| `prefix t` | New window in pane cwd; on sessions with `@ssh_host` set (by the Vicinae tmux-sessions extension), runs `ssh <host>` instead |
| `prefix [` / `prefix H` | Previous window |
| `prefix ]` / `prefix L` | Next window |
| `prefix %` | Split right, 30% width, pane cwd |
| `prefix "` | Split below, 25% height, pane cwd |
| `prefix Escape` | Copy mode |
| `ctrl+h/j/k/l` (no prefix) | Select pane left/down/up/right, or forward the key if the pane runs vim/nvim/fzf (`is_vim`) |
| `prefix ctrl+l` | Send `ctrl+l` (clear screen) |
| `prefix o` | tmux-sessionx picker (`@sessionx-bind`) |
| `C-Space` (no prefix) | tmux-palette |
| `M-f` / `M-m` | tmux-palette find pane / move pane |
### Copy mode (vi)
`prefix ?` opens all of them in a popup (`omarchy-menu-tmux-keybindings`).
| Key | Action |
| --- | --- |
| `v` | Begin selection |
| `y` | Copy to `wl-copy` and exit |
| `Y` | Copy to `wl-copy` and cancel |
| Mouse drag end | Copy to `wl-copy` |
| `ctrl+h/j/k/l` | Select pane |
| `prefix q` | Reload config |
| `prefix /` | Copy mode, then search upward |
| `prefix o` | tmux-sessionx: fuzzy-find, switch to, create, rename (`ctrl-r`), or kill (`alt-backspace`) sessions, with a preview |
| `prefix h` / `prefix v` | Split below / right, pane cwd |
| `prefix x` | Kill pane |
| `M-Enter` / `M-S-Enter` / `M-Escape` (no prefix) | Split below / split right / kill pane |
| `C-M-arrows` / `C-M-S-arrows` (no prefix) | Focus pane / resize pane by 5 |
| `prefix c` / `prefix k` / `prefix r` | New window in pane cwd / kill window / rename window |
| `M-1` … `M-9` (no prefix) | Select window 1–9 |
| `M-Left` / `M-Right` (no prefix) | Previous / next window |
| `M-S-Left` / `M-S-Right` (no prefix) | Move window left / right |
| `prefix C` / `prefix K` / `prefix R` | New / kill / rename session |
| `prefix P` / `prefix N`, `M-Up` / `M-Down` | Previous / next session |
| Copy mode `v` / `y` | Begin selection / copy and exit |
## Window tabs
The status line copies kitty's tab bar (`tab_bar_style powerline`, `tab_powerline_style angled`). The current window is an accent-tinted plate with accent text. The other windows use `bg=default` and muted text, so the terminal's transparency shows through them, as with kitty's `tab_bar_background none`. As in kitty, a solid arrow leads into the current window and a thin one sits between two inactive windows. The arrow into the current window is its notch, drawn with the inverse glyph `U+E0D6` in the plate color, which keeps the notch transparent. The session name is an accent pill on the far left (`status-justify left`); its arrow points straight into the first tab, so the pill and tabs read as one chain of arrows. The right side shows `COPY`/`PREFIX`/`ZOOM` flags and the hostname.
Colors are the user options `@tab-bg` (the session pill's text), `@tab-fg`, `@tab-active-bg`, and `@tab-active-fg`. `tmux.conf` sets cyberdream defaults, then sources `~/.local/state/omarchy/current/theme/tmux.conf` if it exists. Omarchy renders that file from `~/.config/omarchy/themed/tmux.conf.tpl`, using the same derivation as the kitty tab bar (active background = accent mixed 20% into background). On a theme change, the `theme-set.d/tmux-tabs` hook re-sources it into the running server, so the tabs recolor like kitty's.
### Tab labels
Each window reads `<index> <icon> <label>`, updating as you work, the same rule as kitty's `tab_bar.py`:
| Pane runs | Label | Source |
| --- | --- | --- |
| `nvim`/`vim`/`hx`/`helix`, editing a file | The file name | The title nvim sets (`<file> \| <org/repo>`, astrocore `custom_title`), read from `#{pane_title}` by the format itself, so a buffer switch relabels the tab immediately |
| Anything else, or an editor with no file | Repo the cwd belongs to (walks up for `.git`); the directory name outside a repo; `~` at home | `tab-label.sh`, run as an async `#()` job. When its output differs from the current name, it re-arms `automatic-rename` so tmux relabels right after a `cd` instead of on the next keystroke |
Labels longer than 27 characters end in `…`. The icon comes from tmux-nerd-font-window-name.
## Plugins
@@ -64,22 +77,26 @@ The prefix is the default `ctrl+b`.
| --- | --- |
| `tmux-plugins/tpm` | Plugin manager |
| `tmux-plugins/tmux-sensible` | Defaults |
| `joshmedeski/tmux-nerd-font-window-name` | Fills `#{window_icon}` from `tmux-nerd-font-window-name.yml` |
| `tmux-plugins/tmux-resurrect` | `@resurrect-capture-pane-contents on` |
| `tmux-plugins/tmux-continuum` | `@continuum-save-interval 10`, `@continuum-restore on` |
| `omerxx/tmux-sessionx` | `@sessionx-bind o`; `@sessionx-zoxide-mode on` (a query that matches no session is resolved through zoxide into a new session); `@sessionx-fzf-builtin-tmux on` (`fzf --tmux` popup; needs fzf ≥ 0.53, bat for previews) |
### Status line (dotbar)
### Persistence
Top, rounded, centered (`absolute-centre`), left section on, right off, session on the left. Colors: bg `#0B0E14`, fg `#475266`, current `#BFBDB6`, session `#565B66`, prefix `#95E6CB`. Window format ` #W ` separated by ` • `; right text ` %H:%M `. Bold off. SSH indicator enabled with an icon; maximized icon only on the zoomed tab.
resurrect saves sessions, windows, panes, cwds, pane contents, and a default set of programs (nvim, less, man, …). Keys: `prefix C-s` saves, `prefix C-r` restores. continuum saves automatically every 10 minutes. When a tmux server starts and no other tmux server is running, continuum restores the last save. In practice that means the first Ghostty window after login or a reboot.
## tmux-nerd-font-window-name.yml
`show-name: true`, icon on the left, a fallback icon, blank multi-pane icon. Icons are defined for `mprocs`, `mm`, `macmon`, `make`, `zsh`, `nvim`, `devbox`, `psql`, `yazi`, `lazygit`, `gh`, `tv`, `docker`, `bun`, `node`, `npm`, `pnpm`, `go`, `bunx`, `claude`.
`show-name: false`, because `automatic-rename-format` supplies the label. The icon sits on the left, with a fallback icon and a blank multi-pane icon. Icons are defined for `mprocs`, `mm`, `macmon`, `make`, `zsh`, `nvim`, `devbox`, `psql`, `yazi`, `lazygit`, `gh`, `tv`, `docker`, `bun`, `node`, `npm`, `pnpm`, `go`, `bunx`, and `claude`. The plugin parses the YAML with awk and does not interpret `\U` escapes, so the glyphs are literal characters.
## niri-title.sh
Installed only on Linux `desktop`/`laptop` roles (gated in `.chezmoiignore.tmpl`). Given the pane command, path, tty and title, it prints a context segment for the window title read by [Niri](/desktop/niri), by priority:
Installed only on Linux `desktop`/`laptop` roles (gated in `.chezmoiignore.tmpl`). Given the pane command, path, tty, and title, it prints a context segment for the window title read by [Niri](/desktop/niri). It picks the first match:
1. `ssh`/`mosh-client`/`autossh`/`et`: the remote target.
2. `nvim`/`vim`: the pane title (current file).
3. Git repo: directory name and branch.
4. Otherwise the cwd basename.
`tmux.conf` does not currently call the script; its title string is `#T (#S)`.
`tmux.conf` does not currently call the script; its title string is `#h:#W`.