@@ -1,6 +1,6 @@ |
| 1 | # Tmux Configuration Reference | 1 | # Tmux Configuration Reference |
| 2 | | 2 | |
| 3 | -Current tmux setup with plugin defaults and custom prefix keys. | 3 | +Custom tmux setup with global keybind toggle and Wayland integration. |
| 4 | | 4 | |
| 5 | ## Prefix Keys | 5 | ## Prefix Keys |
| 6 | | 6 | |
@@ -8,57 +8,113 @@ Current tmux setup with plugin defaults and custom prefix keys. |
| 8 | |-----|------| | 8 | |-----|------| |
| 9 | | `Ctrl-Space` | Primary prefix | | 9 | | `Ctrl-Space` | Primary prefix | |
| 10 | | `Ctrl-b` | Fallback prefix | | 10 | | `Ctrl-b` | Fallback prefix | |
| | 11 | +| `prefix + r` | Reload configuration | |
| 11 | | 12 | |
| 12 | -## Core Bindings | 13 | +## Global Toggle System |
| 13 | | 14 | |
| 14 | | Keybind | Action | | 15 | | Keybind | Action | |
| 15 | |---------|--------| | 16 | |---------|--------| |
| 16 | -| `prefix + r` | Reload configuration | | 17 | +| `Ctrl-g` | Toggle ALL custom keybinds on/off | |
| | 18 | + |
| | 19 | +**When OFF:** All custom binds disabled, keys pass through to applications |
| | 20 | +**When ON:** Custom tmux binds active (default state) |
| | 21 | + |
| | 22 | +## Window (Tab) Management |
| | 23 | + |
| | 24 | +| Keybind | Action | |
| | 25 | +|---------|--------| |
| | 26 | +| `Ctrl-t` | New window | |
| | 27 | +| `Ctrl-w` | Close window (with confirmation) | |
| | 28 | +| `Ctrl-Alt-Left` | Previous window | |
| | 29 | +| `Ctrl-Alt-Right` | Next window | |
| | 30 | + |
| | 31 | +## Pane Management |
| | 32 | + |
| | 33 | +**Create Panes:** |
| | 34 | +| Keybind | Action | |
| | 35 | +|---------|--------| |
| | 36 | +| `Alt-\` | Split vertically (left/right) | |
| | 37 | +| `Alt-|` | Split horizontally (top/bottom) | |
| | 38 | + |
| | 39 | +**Close Panes:** |
| | 40 | +| Keybind | Action | |
| | 41 | +|---------|--------| |
| | 42 | +| `Alt-Shift-W` | Kill pane (with confirmation) | |
| | 43 | +| `Ctrl-Alt-w` | Kill pane (backup binding) | |
| | 44 | + |
| | 45 | +**Navigate Panes:** |
| | 46 | +| Keybind | Action | |
| | 47 | +|---------|--------| |
| | 48 | +| `Ctrl-Alt-Left` | Focus left pane | |
| | 49 | +| `Ctrl-Alt-Right` | Focus right pane | |
| | 50 | +| `Ctrl-Alt-Up` | Focus up pane | |
| | 51 | +| `Ctrl-Alt-Down` | Focus down pane | |
| | 52 | + |
| | 53 | +**Resize Panes:** |
| | 54 | +| Keybind | Action | |
| | 55 | +|---------|--------| |
| | 56 | +| `Ctrl-Alt-Shift-Left` | Resize left (5 units) | |
| | 57 | +| `Ctrl-Alt-Shift-Right` | Resize right (5 units) | |
| | 58 | +| `Ctrl-Alt-Shift-Up` | Resize up (2 units) | |
| | 59 | +| `Ctrl-Alt-Shift-Down` | Resize down (2 units) | |
| | 60 | + |
| | 61 | +## Copy Mode (Vi-style) |
| | 62 | + |
| | 63 | +**Clipboard Integration (Wayland):** |
| | 64 | +| Keybind | Action | |
| | 65 | +|---------|--------| |
| | 66 | +| `y` | Copy and exit copy-mode | |
| | 67 | +| `Y` | Copy and stay in copy-mode | |
| | 68 | +| Mouse drag | Copy without exiting copy-mode | |
| | 69 | + |
| | 70 | +## Plugin Keybinds |
| | 71 | + |
| | 72 | +Your installed plugins and their default keybinds: |
| | 73 | + |
| | 74 | +| Plugin | Keybind | Action | |
| | 75 | +|--------|---------|--------| |
| | 76 | +| **tmux-yank** | `prefix + y` | Copy command line to clipboard | |
| | 77 | +| | `y` (copy-mode) | Yank selection | |
| | 78 | +| **tmux-copycat** | `prefix + /` | Regex search | |
| | 79 | +| | `prefix + Ctrl-f` | Search files | |
| | 80 | +| | `prefix + Ctrl-g` | Search git files | |
| | 81 | +| | `prefix + Ctrl-u` | Search URLs | |
| | 82 | +| | `prefix + Ctrl-d` | Search numbers | |
| | 83 | +| | `prefix + Alt-h` | Search SHA hashes | |
| | 84 | +| | `prefix + Alt-i` | Search IP addresses | |
| | 85 | +| **tmux-open** | `o` (copy-mode) | Open highlighted path/URL | |
| | 86 | +| | `Ctrl-o` (copy-mode) | Open in $EDITOR | |
| | 87 | +| **tmux-fzf** | `prefix + F` | FZF session/window/pane picker | |
| | 88 | +| **tmux-fzf-url** | `prefix + u` | FZF URL picker | |
| | 89 | +| **tmux-resurrect** | `prefix + Ctrl-s` | Save session | |
| | 90 | +| | `prefix + Ctrl-r` | Restore session | |
| | 91 | +| **tmux-continuum** | *(automatic)* | Auto-save every 15 min | |
| | 92 | +| **TPM** | `prefix + I` | Install plugins | |
| | 93 | +| | `prefix + U` | Update plugins | |
| | 94 | +| | `prefix + Alt-u` | Uninstall removed plugins | |
| | 95 | + |
| | 96 | +## Configuration Features |
| | 97 | + |
| | 98 | +**Options:** |
| | 99 | +- Vi-mode keys enabled |
| | 100 | +- Mouse support enabled |
| | 101 | +- 100,000 line history |
| | 102 | +- Windows/panes start at index 1 |
| | 103 | +- Auto-renumber windows |
| | 104 | +- Fast escape time (10ms) |
| | 105 | +- Wayland clipboard integration via wl-copy |
| | 106 | + |
| | 107 | +**Modular Structure:** |
| | 108 | +- `~/.tmux.conf` - Main entry point |
| | 109 | +- `~/.tmux.d/10-options.conf` - General options |
| | 110 | +- `~/.tmux.d/20-keys.conf` - Custom keybinds |
| | 111 | +- `~/.tmux.d/30-mouse.conf` - Mouse settings |
| | 112 | +- `~/.tmux.d/40-status-theme.conf` - Status bar |
| | 113 | +- `~/.tmux.d/50-plugins.conf` - Plugin configuration |
| | 114 | +- `~/.tmux.local.conf` - Local overrides |
| 17 | | 115 | |
| 18 | -## Plugin Defaults — Quick Reference | 116 | +**Special Features:** |
| 19 | - | 117 | +- All custom keybinds can be globally toggled with `Ctrl-g` |
| 20 | -> "prefix" means your tmux prefix key (Ctrl-Space or Ctrl-b). | 118 | +- When disabled, keys pass through to applications |
| 21 | - | 119 | +- Wayland clipboard integration with wl-copy |
| 22 | -| Plugin | Default keys | Context | What it does | Notes / Tips | | 120 | +- Auto-restore sessions on tmux startup |
| 23 | -|---|---|---|---|---| | | |
| 24 | -| tmux-yank | prefix + **y** | Normal mode | Copy the current command-line text to system clipboard. | Also **prefix + Y** copies the pane's CWD. | | | |
| 25 | -| | **y** | Copy-mode | Yank the current selection to system clipboard. | **Y** "puts" selection to the command line. | | | |
| 26 | -| tmux-copycat | prefix + **/** | Normal mode | Start regex (or plain text) search; enter "copycat mode". | Then **n/N** next/prev match; **Enter** to copy (vi mode). | | | |
| 27 | -| | prefix + **Ctrl-f** | Normal mode | Predefined search: files. | Other presets below. | | | |
| 28 | -| | prefix + **Ctrl-g** | Normal mode | Predefined search: `git status` files. | | | | |
| 29 | -| | prefix + **Alt-h** | Normal mode | Predefined search: SHA hashes. | | | | |
| 30 | -| | prefix + **Ctrl-u** | Normal mode | Predefined search: URLs. | | | | |
| 31 | -| | prefix + **Ctrl-d** | Normal mode | Predefined search: numbers (digits). | | | | |
| 32 | -| | prefix + **Alt-i** | Normal mode | Predefined search: IP addresses. | | | | |
| 33 | -| tmux-open | **o** | Copy-mode | Open highlighted path/URL with system default app. | **Ctrl-o** open in `$EDITOR`; **Shift-s** search the text. | | | |
| 34 | -| tmux-fzf | prefix + **F** (Shift+f) | Normal mode | Launch fzf-driven session/window/pane switcher (popup on modern tmux). | Inside fzf: **Tab/Shift-Tab** to multi-select. | | | |
| 35 | -| tmux-fzf-url | prefix + **u** | Normal mode | Fuzzy-pick any URL visible in the pane and open it. | Change with `set -g @fzf-url-bind 'x'` if desired. | | | |
| 36 | -| tmux-resurrect | prefix + **Ctrl-s** | Normal mode | Save full tmux state (sessions/windows/panes, dirs, layout). | | | | |
| 37 | -| | prefix + **Ctrl-r** | Normal mode | Restore last saved state. | | | | |
| 38 | -| tmux-continuum | *(no keys; runs in background)* | — | Auto-saves every ~15 min; auto-restore on tmux start if enabled. | Enable restore: `set -g @continuum-restore 'on'`. | | | |
| 39 | -| tmux-prefix-highlight | *(no keys)* | — | Adds `#{prefix_highlight}` segment showing when prefix is active. | Add it to your status-left/right to display. | | | |
| 40 | -| TPM (plugin manager) | prefix + **I** | Normal mode | Install/refresh plugins. | | | | |
| 41 | -| | prefix + **U** | Normal mode | Update plugins. | | | | |
| 42 | -| | prefix + **Alt+u** | Normal mode | Uninstall plugins removed from config. | | | | |
| 43 | - | | |
| 44 | -## Configuration Structure | | |
| 45 | - | | |
| 46 | -The tmux configuration is modular: | | |
| 47 | -- **Main config:** `.tmux.conf` (minimal entrypoint) | | |
| 48 | -- **Modular includes:** `.tmux.d/` directory | | |
| 49 | - - `10-options.conf` - General options | | |
| 50 | - - `20-keys.conf` - Keybindings | | |
| 51 | - - `30-mouse.conf` - Mouse settings | | |
| 52 | - - `40-status-theme.conf` - Status bar theme | | |
| 53 | - - `50-plugins.conf` - Plugin configuration | | |
| 54 | -- **Local overrides:** `.tmux.local.conf` | | |
| 55 | - | | |
| 56 | -## Terminal Features | | |
| 57 | - | | |
| 58 | -- **Truecolor support** enabled | | |
| 59 | -- **256-color terminal** capability | | |
| 60 | -- **Terminal overrides** for proper color support | | |
| 61 | - | | |
| 62 | -## Verify what's bound in *your* session | | |
| 63 | -- List keys: `tmux list-keys | grep -Ei 'yank|copycat|open|fzf|resurrect|continuum|tpm'` | | |
| 64 | -- Some plugins adapt to tmux version/OS; use the command above as source of truth. | | |