Files
nixos-config/docs/tmux.md
T
kiskaadee 7c5e14c905 refactor: decouple sops-nix from workstation, update documentation, and clean up scripts
- Remove `sops-nix` input and integration modules from `flake.nix` and `flake.lock`.
- Transition secrets management documentation (`docs/secrets-management.md`, `docs/package-and-secrets.md`) to reflect the workstation's role as an operator management station targeting the decoupled Core repository.
- Remove obsolete `$HOME/Core/scripts` from user `sessionPath` in `home/default.nix` and `home/shell.nix`.
- Clean up Hyprland code paths in the Niri-native `record.sh` utility.
- Refine DMS options in `system/desktop.nix`.
2026-09-13 01:17:15 -05:00

73 lines
2.4 KiB
Markdown

# 🎛️ Tmux Environment & Cheat Sheet
This repository configures **Tmux** declaratively via Home Manager in [home/shell.nix](file:///home/kiskaadee/Config/home/shell.nix). The configuration is optimized for speed, Vim keybindings, and seamless split-pane navigation.
---
## 🔑 Core Settings
* **Prefix Key**: Uses the default **`Ctrl+b`**.
* **Status Bar**: Anchored to the **top** of the terminal window.
* **Base Index**: Windows and panes start indexing at **`1`** (aligning with your physical keyboard numbers).
* **Mouse Support**: Enabled. You can scroll, click to select panes, and drag splits to resize them.
* **Zero Esc-Lag**: Keyboard escape latency is set to `0ms` (essential for vim editing response).
---
## 🧭 Seamless Neovim Navigation
The configuration loads the **`vim-tmux-navigator`** plugin. This allows you to navigate between Vim/Neovim split windows and Tmux splits using the same hotkeys **without pressing the prefix key**:
| Shortcut | Action |
| :--- | :--- |
| `Ctrl + h` | Focus pane/split to the **left** |
| `Ctrl + j` | Focus pane/split **down** |
| `Ctrl + k` | Focus pane/split **up** |
| `Ctrl + l` | Focus pane/split to the **right** |
---
## 📋 Common Tmux Keybindings
For the following shortcuts, press your prefix key **`Ctrl+b`** first, release it, then press the shortcut key.
### Sessions & Windows
| Key | Action |
| :--- | :--- |
| `d` | **Detach** from the current session (keeps it running in the background) |
| `c` | Create a **new window** (tab) |
| `,` | **Rename** the current window |
| `&` | Kill the current window |
| `1` - `9` | Switch to window by index number |
### Splits & Panes
| Key | Action |
| :--- | :--- |
| `"` | Split pane **horizontally** (top/bottom) |
| `%` | Split pane **vertically** (left/right) |
| `x` | Close/kill the current pane |
| `z` | **Zoom** the current pane to full screen (press again to restore) |
| `h` / `j` / `k` / `l` | Vim-style switch focus left/down/up/right (alternative to Ctrl+direction) |
---
## 🖥️ Command Line Session Management
Manage your persistent background sessions directly from your shell:
```bash
# Start a new named session
tmux new -s my-session-name
# List all active background sessions
tmux ls
# Attach to an existing session
tmux a -t my-session-name
# Or attach to the last active session:
tmux a
# Kill a session
tmux kill-session -t my-session-name
```