From 0616e3db30ce4a9c03f29d359a5433bb8f228c11 Mon Sep 17 00:00:00 2001 From: Emma Thorpe Date: Wed, 10 Jun 2026 14:25:18 +0100 Subject: [PATCH] docs: sync shell/keybinding docs with the rest of the branch Update the interactive-shell README and keybindings reference for changes made after the initial docs commit: no scheduled GC (manual only), NO_TMUX escape hatch, default-terminal tmux-256color + truecolor, the JetBrainsMono Nerd Font (new Fonts section + iTerm2 caveat), the UseKeychain IgnoreUnknown guard, and the vim-tmux-navigator (Ctrl-hjkl) + resurrect save/restore tmux bindings. Co-Authored-By: Claude Opus 4.8 (1M context) --- lyrathorpe/home/KEYBINDINGS.md | 5 +++++ lyrathorpe/home/README.md | 24 +++++++++++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/lyrathorpe/home/KEYBINDINGS.md b/lyrathorpe/home/KEYBINDINGS.md index dc9a4cf..2382edc 100644 --- a/lyrathorpe/home/KEYBINDINGS.md +++ b/lyrathorpe/home/KEYBINDINGS.md @@ -133,16 +133,21 @@ Prefix is **`Ctrl`+`b`** (default). Copy mode uses **vi** keys. | --- | --- | | `Ctrl`+`b` then `v` | Split into left/right panes | | `Ctrl`+`b` then `s` | Split into top/bottom panes | +| `Ctrl`+`h`/`j`/`k`/`l` | Move between panes — and into/out of vim splits — seamlessly (vim-tmux-navigator, no prefix) | | `Alt`+`←`/`→`/`↑`/`↓` | Switch pane by direction (no prefix needed) | | `Ctrl`+`b` then `[` | Enter copy mode (then vi motions; `Space`/`Enter` to select/copy) | | `Ctrl`+`b` then `z` | Zoom / unzoom the focused pane | | `Ctrl`+`b` then `c` | New window | | `Ctrl`+`b` then `n` / `p` | Next / previous window | | `Ctrl`+`b` then `d` | Detach | +| `Ctrl`+`b` then `Ctrl`+`s` / `Ctrl`+`r` | Save / restore the session (resurrect; continuum also auto-saves and restores on start) | | Mouse | Enabled — click to focus, drag borders, scroll, select | > The stock split keys `%` and `"` are unbound; use `v` / `s` above. `Ctrl`+`b` > then `s` is therefore a split, not the session tree. +> +> Sessions persist across reboots (resurrect + continuum). Terminals auto-start +> tmux; `NO_TMUX=1 ` opens a bare shell instead. --- diff --git a/lyrathorpe/home/README.md b/lyrathorpe/home/README.md index 6fbbe6e..0307a28 100644 --- a/lyrathorpe/home/README.md +++ b/lyrathorpe/home/README.md @@ -44,7 +44,7 @@ on top (work email, its own ssh config, extra packages). | `bat` | syntax-highlighting pager; behaves like `cat` when piped | | `nix-index` | `command-not-found`: an unknown command tells you which Nix package provides it (prebuilt DB, no manual indexing) | | `comma` (`,`) | run an uninstalled program once: `, cowsay hi` | -| `nh` | nicer `nixos-rebuild`/`home-manager` with diffs; `$NH_FLAKE` set to the repo; weekly user-GC timer (`--keep 5 --keep-since 3d`) | +| `nh` | nicer `nixos-rebuild`/`home-manager` with diffs; `$NH_FLAKE` set to the repo. No scheduled GC (it could reap paths a running generation still references) — collect garbage manually with `nh clean all` / `nix-collect-garbage -d` | ## tmux @@ -52,7 +52,7 @@ on top (work email, its own ssh config, extra packages). Linux console — drops you straight into a tmux session named `main` (attach if it exists, else create). Panes run a plain non-login zsh. It deliberately does **not** fire for SSH sessions, VS Code's integrated terminal, already-inside-tmux, or -non-interactive shells. +non-interactive shells. Escape hatch: `NO_TMUX=1 ` opens a bare shell. | Setting | Value | | --- | --- | @@ -64,11 +64,21 @@ non-interactive shells. | `base-index` / `pane-base-index` | 1 | | Splits | `prefix s` vertical, `prefix v` horizontal (stock `%`/`"` unbound) | | Pane nav | `Alt`+arrows (no prefix) | +| Terminal | `default-terminal tmux-256color`; truecolor advertised per outer terminal (`foot*`, `xterm-256color`/iTerm2) via `terminal-features … RGB` | | Clipboard | `set-clipboard on`; foot `terminal-features` advertise truecolor/sync/OSC52/title/cursor | **Plugins:** `sensible`, `vim-tmux-navigator` (Ctrl-h/j/k/l across vim ↔ tmux), `yank`, `catppuccin` (Mocha statusline), `resurrect` + `continuum` -(sessions auto-save and restore across reboots). +(sessions auto-save and restore across reboots). The statusline draws Nerd-Font +glyphs — see Fonts. + +## Fonts + +**JetBrainsMono Nerd Font** is installed on every host (in `common-nixos.nix`, +because tmux runs everywhere; the Mac installs it to `/Library/Fonts` via the +Darwin config). foot uses it as its main font automatically. iTerm2's font is a +GUI setting — set it to *JetBrainsMono Nerd Font* (Settings → Profiles → Text → +Font) so the tmux statusline glyphs render instead of `?`. ## git @@ -99,7 +109,7 @@ Conventional Commits. | Feature | Notes | | --- | --- | | ssh-agent | runs on Linux (launchd on macOS); keys added on **first use** so the passphrase is typed once per login session — this also feeds git commit signing | -| macOS | `UseKeychain` caches the passphrase in the login keychain | +| macOS | `UseKeychain` caches the passphrase in the login keychain (guarded by `IgnoreUnknown`, so a non-Apple `ssh` skips it instead of erroring) | | Gitea remote | `code.emmathe.dev` → `HostName 10.187.1.76` (DNS-override), `Port 30009`, user `git`, dedicated key, `identitiesOnly` | | Defaults | the module's deprecated default block is opted out; equivalents kept under `settings."*"` | @@ -109,10 +119,10 @@ forced off there) but still runs the agent. ## Maintenance behaviours - **zcompdump reset** — `~/.zcompdump*` is removed on every activation, so a stale - dump (pointing at `/nix/store` paths a rebuild or the weekly GC removed) can't + dump (pointing at `/nix/store` paths a rebuild or a manual GC removed) can't break completion with `_git: function definition file not found`. -- **Weekly GC** — `nh clean` runs weekly as a user timer, keeping the last 5 - generations and anything newer than 3 days. +- **GC** — no scheduled timer; collect garbage deliberately (`nh clean all` / + `nix-collect-garbage -d`) when no important session is running. ## Per-host differences