mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 11:32:42 +00:00
docs(docs): expand terminal and tmux documentation with launch commands, prompts, persistence, and keybinding updates
This commit is contained in:
1 parent
ce9886c2e7
commit
9e227b416d
10 files changed
+106
-76
No files matched your search
@@ -279,7 +279,7 @@ Focuses an app's window, cycles to the next one on repeated presses, or launches
|
|||||||
| `ghostty` | `ghostty` | `ghostty` |
|
| `ghostty` | `ghostty` | `ghostty` |
|
||||||
| `browser` | zen, brave, chromium, google-chrome, firefox, librewolf, vivaldi, microsoft-edge, helium — excluding `chrome-`/`webapp-` web apps | `omarchy-launch-browser` |
|
| `browser` | zen, brave, chromium, google-chrome, firefox, librewolf, vivaldi, microsoft-edge, helium — excluding `chrome-`/`webapp-` web apps | `omarchy-launch-browser` |
|
||||||
| `brave` | `^brave` (Brave Origin and its web apps) | `brave-origin` |
|
| `brave` | `^brave` (Brave Origin and its web apps) | `brave-origin` |
|
||||||
| `terminal` | kitty, alacritty, ghostty, foot, wezterm (Tern, the scratchpad terminal, does not match) | `omarchy-launch-terminal` |
|
| `terminal` | kitty, alacritty, ghostty, foot, wezterm (Tern, the scratchpad terminal, does not match) | `omarchy-launch-terminal` (`xdg-terminal-exec`: the OS default terminal from `~/.config/xdg-terminals.list`, in the focused terminal's cwd) |
|
||||||
| `ai` | `claude\|hermes` | `hermes desktop` |
|
| `ai` | `claude\|hermes` | `hermes desktop` |
|
||||||
| anything else | `^APP$` | the argument as a command |
|
| anything else | `^APP$` | the argument as a command |
|
||||||
|
|
||||||
|
|||||||
@@ -433,7 +433,7 @@ Deployed to `~/.config/niri/scripts/`. `70-binds.kdl` binds none of them, so the
|
|||||||
| `kitty-CLASS` | exactly that class | `kitty --class kitty-CLASS` (optional command from the empty `KITTY_CMDS` map) |
|
| `kitty-CLASS` | exactly that class | `kitty --class kitty-CLASS` (optional command from the empty `KITTY_CMDS` map) |
|
||||||
| `ghostty` | `ghostty` | nothing, prints a message |
|
| `ghostty` | `ghostty` | nothing, prints a message |
|
||||||
| `browser` | `^(zen\|brave\|chromium\|firefox)` | `zen` |
|
| `browser` | `^(zen\|brave\|chromium\|firefox)` | `zen` |
|
||||||
| `terminal` | `kitty\|alacritty\|ghostty` | `kitty` |
|
| `terminal` | `kitty\|alacritty\|ghostty` | `xdg-terminal-exec` (the OS default terminal from `~/.config/xdg-terminals.list`) |
|
||||||
| `ai` | `claude\|hermes` | `hermes desktop` |
|
| `ai` | `claude\|hermes` | `hermes desktop` |
|
||||||
| anything else | exact app-id | the argument as a command |
|
| anything else | exact app-id | the argument as a command |
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ Interactive shells only (`[[ $- != *i* ]] && return`). In order:
|
|||||||
6. Sources `~/.config/zsh/keybinds.zsh`.
|
6. Sources `~/.config/zsh/keybinds.zsh`.
|
||||||
7. `eval "$(suv init zsh)"` if suvadu is installed.
|
7. `eval "$(suv init zsh)"` if suvadu is installed.
|
||||||
8. Sources `~/.config/envman/load.sh` if it is non-empty.
|
8. Sources `~/.config/envman/load.sh` if it is non-empty.
|
||||||
9. `eval "$(starship init zsh)"` if starship is installed.
|
9. **Prompt.** If starship is installed: `eval "$(starship init zsh)"`, `ZLE_RPROMPT_INDENT=0` (the right-prompt clock sits flush with the edge), and a transient prompt. A `line-finish` zle hook swaps `PROMPT`/`RPROMPT` to the `transient` and `transient_right` starship profiles (`❯`, colored by the last exit status, and the time) and redraws, so past prompts collapse as in fish; a `precmd` hook restores the full prompt. Starship's zsh init also sets `PROMPT2`, the `∙` continuation prompt for unfinished lines. See [Starship](/shell/starship#shell-integration).
|
||||||
|
**Window title.** A `precmd` hook ports `fish_title`: it sets the terminal title to `%~`, prefixed with the first 10 characters of the hostname over SSH, and inside tmux also sets the window name (`ESC k`), like fish's `50-terminal-title.fish`. Unlike fish's `prompt_pwd`, the path is not abbreviated.
|
||||||
10. `eval "$(tv init zsh)"` if `tv` is installed (<kbd>ctrl-t</kbd> smart autocomplete).
|
10. `eval "$(tv init zsh)"` if `tv` is installed (<kbd>ctrl-t</kbd> smart autocomplete).
|
||||||
11. **Syntax highlighting.** Sources the first `zsh-syntax-highlighting.zsh` found in `/usr/share/zsh/plugins/zsh-syntax-highlighting/`, `/opt/homebrew/share/zsh-syntax-highlighting/`, or `/usr/local/share/zsh-syntax-highlighting/`. The comment says this must stay last, because it wraps every zle widget defined before it.
|
11. **Syntax highlighting.** Sources the first `zsh-syntax-highlighting.zsh` found in `/usr/share/zsh/plugins/zsh-syntax-highlighting/`, `/opt/homebrew/share/zsh-syntax-highlighting/`, or `/usr/local/share/zsh-syntax-highlighting/`. The comment says this must stay last, because it wraps every zle widget defined before it.
|
||||||
12. **atuin.** `eval "$(atuin init zsh)"` if atuin is installed. This line comes after the syntax-highlighting block, so despite the comment, syntax highlighting is not actually last. atuin loads after tv, so it keeps <kbd>ctrl-r</kbd>.
|
12. **atuin.** `eval "$(atuin init zsh)"` if atuin is installed. This line comes after the syntax-highlighting block, so despite the comment, syntax highlighting is not actually last. atuin loads after tv, so it keeps <kbd>ctrl-r</kbd>.
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ fish is the main interactive shell. bash and zsh are set up to feel the same: th
|
|||||||
| Concern | fish | bash | zsh |
|
| Concern | fish | bash | zsh |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| Aliases | `conf.d/20-aliases.fish` (hand-maintained) | `~/.config/shell/aliases.sh` (rendered from YAML) | same as bash |
|
| Aliases | `conf.d/20-aliases.fish` (hand-maintained) | `~/.config/shell/aliases.sh` (rendered from YAML) | same as bash |
|
||||||
| Prompt | starship + transient prompt | starship | starship |
|
| Prompt | starship + transient prompt | starship | starship + transient prompt |
|
||||||
| History | atuin (hishtory also sourced if installed) | atuin | atuin, plus suvadu if installed |
|
| History | atuin (hishtory also sourced if installed) | atuin | atuin, plus suvadu if installed |
|
||||||
| Key bindings | vi mode plus custom binds | atuin defaults only | emacs keymap plus ports of the fish binds |
|
| Key bindings | vi mode plus custom binds | atuin defaults only | emacs keymap plus ports of the fish binds |
|
||||||
| cd-style helpers | `functions/*.fish` | `~/.config/bash/functions/*.bash` | `~/.config/zsh/functions/*.zsh` |
|
| cd-style helpers | `functions/*.fish` | `~/.config/bash/functions/*.bash` | `~/.config/zsh/functions/*.zsh` |
|
||||||
|
|||||||
@@ -17,10 +17,12 @@ The file is not a template and applies on every role. `starship` is in `.chezmoi
|
|||||||
| --- | --- |
|
| --- | --- |
|
||||||
| fish | `conf.d/40-tools.fish` runs `starship init fish`, then `config.fish` runs it again and calls `enable_transience` |
|
| fish | `conf.d/40-tools.fish` runs `starship init fish`, then `config.fish` runs it again and calls `enable_transience` |
|
||||||
| bash | `eval "$(starship init bash)"` in `~/.bashrc` |
|
| bash | `eval "$(starship init bash)"` in `~/.bashrc` |
|
||||||
| zsh | `eval "$(starship init zsh)"` in `~/.zshrc` |
|
| zsh | `eval "$(starship init zsh)"` in `~/.zshrc`, plus a transient-prompt hook |
|
||||||
|
|
||||||
With transience in fish, past prompts in the scrollback collapse to the output of `starship_transient_prompt_func` (`starship module character`, the `❯` alone) and `starship_transient_rprompt_func` (`starship module time`). See [fish](/shell/fish#configfish).
|
With transience in fish, past prompts in the scrollback collapse to the output of `starship_transient_prompt_func` (`starship module character`, the `❯` alone) and `starship_transient_rprompt_func` (`starship module time`). See [fish](/shell/fish#configfish).
|
||||||
|
|
||||||
|
zsh has no built-in transience, so `~/.zshrc` collapses past prompts itself, rendering the `transient` (`$character`) and `transient_right` (`$time`) entries under `[profiles]` with `starship prompt --profile`. It uses profiles rather than `starship module` because only `starship prompt` wraps color escapes in zsh's `%{…%}`; without them zsh miscounts the right prompt's width. zsh also gets starship's default `∙` continuation prompt (`PROMPT2`). See [bash and zsh](/shell/bash-zsh#zshrc).
|
||||||
|
|
||||||
## Layout
|
## Layout
|
||||||
|
|
||||||
```toml ~/.config/starship.toml
|
```toml ~/.config/starship.toml
|
||||||
|
|||||||
+36
-26
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
title: Ghostty
|
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 |
|
| 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` |
|
| `background-opacity` / `background-blur` | `0.9` / `true` |
|
||||||
| `window-decoration` | `false`; `gtk-titlebar = false` |
|
| `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 |
|
| `cursor-style` | `underline`, blinking |
|
||||||
| `scrollback-limit` | `3023` |
|
| `scrollback-limit` | `3023` (tmux keeps the real scrollback: `history-limit 50000`) |
|
||||||
| `mouse-hide-while-typing` | `true` |
|
| `mouse-hide-while-typing` | `true` |
|
||||||
| `copy-on-select` | `false` |
|
| `copy-on-select` | `false` |
|
||||||
| `confirm-close-surface` | `false` |
|
| `confirm-close-surface` | `false` |
|
||||||
| `app-notifications` | `no-clipboard-copy,no-config-reload` |
|
| `app-notifications` | `no-clipboard-copy,no-config-reload` |
|
||||||
| `quit-after-last-window-closed` | `false`, delay `5m` |
|
| `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` |
|
| `shell-integration` | `detect`, features `cursor,sudo,title,no-cursor` |
|
||||||
| `gtk-single-instance` | `true` |
|
| `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
|
## 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 |
|
| `ctrl+shift+c` / `ctrl+shift+v` | Copy / paste |
|
||||||
| `cmd+n` | New window |
|
|
||||||
| `ctrl+plus` / `ctrl+minus` / `ctrl+zero` | Font size +1 / -1 / reset |
|
| `ctrl+plus` / `ctrl+minus` / `ctrl+zero` | Font size +1 / -1 / reset |
|
||||||
|
| `ctrl+shift+.` | Reload Ghostty config |
|
||||||
| `shift+enter` | Sends a literal newline |
|
| `shift+enter` | Sends a literal newline |
|
||||||
| `ctrl+shift+alt+,` | Reload config |
|
|
||||||
|
|
||||||
### herdr sync
|
| Key | Sends | tmux action |
|
||||||
|
| --- | --- | --- |
|
||||||
Placed last so they override defaults. Each sends `ctrl+b` (`\x02`) followed by a key; see [herdr](/terminal/herdr).
|
| `ctrl+shift+t` | `prefix c` | New window (tab) in pane cwd |
|
||||||
|
| `ctrl+shift+w` | `prefix k` | Kill window (close tab) |
|
||||||
| Key | Sends |
|
| `ctrl+shift+r` | `prefix r` | Rename window |
|
||||||
| --- | --- |
|
| `ctrl+tab` / `ctrl+page_down` / `ctrl+shift+right` / `ctrl+shift+k` | `prefix n` | Next window |
|
||||||
| `ctrl+shift+n` | `prefix %` (split vertical) |
|
| `ctrl+shift+tab` / `ctrl+page_up` / `ctrl+shift+left` / `ctrl+shift+h` | `prefix p` | Previous window |
|
||||||
| `ctrl+shift+t` | `prefix c` |
|
| `ctrl+shift+l` | `prefix v` | Split right |
|
||||||
| `ctrl+tab` / `ctrl+shift+tab` | `prefix n` / `prefix p` |
|
| `ctrl+shift+e` / `ctrl+shift+j` | `prefix h` | Split below |
|
||||||
| `ctrl+shift+f` | `prefix s` (workspace picker) |
|
| `ctrl+shift+o` | `prefix o` | Session picker (tmux-sessionx) |
|
||||||
| `ctrl+shift+l` / `ctrl+shift+h` | `prefix .` / `prefix ,` (next / previous agent) |
|
| `ctrl+shift+x` | `prefix x` | Kill pane |
|
||||||
| `ctrl+shift+j` / `ctrl+shift+k` | `prefix j` / `prefix k` (next / previous workspace) |
|
| `ctrl+shift+enter` / `ctrl+shift+z` | `prefix z` | Zoom pane |
|
||||||
| `super+enter` | `prefix N` |
|
| `ctrl+shift+f` | `prefix /` | Search scrollback upward |
|
||||||
| `super+r` | `prefix W` |
|
| `ctrl+shift+page_up` | `prefix [` | Copy mode |
|
||||||
| `ctrl+shift+r` | `prefix T` |
|
| `ctrl+shift+p` | `prefix :` | Command prompt |
|
||||||
| `ctrl+shift+,` | `prefix S` (herdr settings) |
|
| `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
|
## Themes
|
||||||
|
|
||||||
|
|||||||
@@ -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` |
|
| 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` |
|
| Target | `~/.config/herdr/`, `~/.config/herdr-nvim/config.toml` |
|
||||||
| Install | Not in `packages.yaml`; updated by topgrade (`herdr update`) |
|
| 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
|
## config.toml
|
||||||
|
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ sidebar:
|
|||||||
label: Overview
|
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 |
|
| Page | Source | What it covers |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| [kitty](/terminal/kitty) | `dot_config/kitty/` | Main config, host configs (tmux, herdr, goliath), kittens, custom tab bar |
|
| [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 |
|
| [Ghostty](/terminal/ghostty) | `dot_config/ghostty/` | tmux-only terminal: ctrl+shift chords → tmux, themes |
|
||||||
| [tmux](/terminal/tmux) | `dot_config/tmux/` | Prefix, bindings, tpm plugins, dotbar status line, Niri titles |
|
| [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 |
|
| [herdr](/terminal/herdr) | `dot_config/herdr/`, `dot_config/herdr-nvim/` | Agent-aware multiplexer: keys, theme, plugins, Claude hook |
|
||||||
|
|
||||||
## Shared conventions
|
## Shared conventions
|
||||||
|
|||||||
@@ -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
|
### 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 |
|
| Key | Sends / does |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
|
|||||||
+57
-40
@@ -1,62 +1,75 @@
|
|||||||
---
|
---
|
||||||
title: tmux
|
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` |
|
| 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/` |
|
| Target | `~/.config/tmux/`, `~/.config/omarchy/` |
|
||||||
| Install | `tmux` in `.chezmoidata/packages.yaml` (pacman, brew) |
|
| 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
|
## Options
|
||||||
|
|
||||||
The prefix is the default `ctrl+b`.
|
The prefix is `ctrl+space`; `ctrl+b` is `prefix2` (the byte Ghostty sends).
|
||||||
|
|
||||||
| Option | Value |
|
| Option | Value |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `default-terminal` | `tmux-256color`; `xterm-kitty:Tc` override; features `RGB:usstyle:hyperlinks:clipboard:extkeys` |
|
| `default-terminal` | `tmux-256color`; `RGB` override for every terminal; `clipboard` feature; `extkeys` for xterm-kitty |
|
||||||
| `extended-keys` | `always`, format `csi-u` |
|
| `extended-keys` | `on`, format `csi-u` |
|
||||||
| `base-index` / `pane-base-index` | `1` / `1`; `renumber-windows on` |
|
| `base-index` / `pane-base-index` | `1` / `1`; `renumber-windows on` |
|
||||||
| `status-position` | `top` |
|
| `status-position` | `top`, `status-interval 5` |
|
||||||
| `allow-passthrough` | `on` (kitty graphics for yazi previews); `TERM`, `TERM_PROGRAM` added to `update-environment` |
|
| `allow-passthrough` / `set-clipboard` / `mouse` / `focus-events` | `on` |
|
||||||
| `set-clipboard` | `on` (OSC 52) |
|
| `update-environment` | `TERM` and `TERM_PROGRAM` appended, so programs see the outer terminal (Ghostty/kitty) |
|
||||||
| `mouse` | `on` |
|
|
||||||
| `mode-keys` | `vi` |
|
| `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` |
|
| `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
|
## Keybindings
|
||||||
|
|
||||||
| Key | Action |
|
`prefix ?` opens all of them in a popup (`omarchy-menu-tmux-keybindings`).
|
||||||
| --- | --- |
|
|
||||||
| `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)
|
|
||||||
|
|
||||||
| Key | Action |
|
| Key | Action |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `v` | Begin selection |
|
| `prefix q` | Reload config |
|
||||||
| `y` | Copy to `wl-copy` and exit |
|
| `prefix /` | Copy mode, then search upward |
|
||||||
| `Y` | Copy to `wl-copy` and cancel |
|
| `prefix o` | tmux-sessionx: fuzzy-find, switch to, create, rename (`ctrl-r`), or kill (`alt-backspace`) sessions, with a preview |
|
||||||
| Mouse drag end | Copy to `wl-copy` |
|
| `prefix h` / `prefix v` | Split below / right, pane cwd |
|
||||||
| `ctrl+h/j/k/l` | Select pane |
|
| `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
|
## Plugins
|
||||||
|
|
||||||
@@ -64,22 +77,26 @@ The prefix is the default `ctrl+b`.
|
|||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `tmux-plugins/tpm` | Plugin manager |
|
| `tmux-plugins/tpm` | Plugin manager |
|
||||||
| `tmux-plugins/tmux-sensible` | Defaults |
|
| `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
|
## 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
|
## 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.
|
1. `ssh`/`mosh-client`/`autossh`/`et`: the remote target.
|
||||||
2. `nvim`/`vim`: the pane title (current file).
|
2. `nvim`/`vim`: the pane title (current file).
|
||||||
3. Git repo: directory name and branch.
|
3. Git repo: directory name and branch.
|
||||||
4. Otherwise the cwd basename.
|
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`.
|
||||||
Reference in new issue
Block a user