docs: refine DMS IPC terminology, reproducibility invariants, and tmux prefix
This commit is contained in:
1 parent
c2ab7620b0
commit
f9342dc8e6
6 files changed
+99
-52
No files matched your search
@@ -99,7 +99,7 @@ For bootstrapping, key generation, and decryption workflows, consult the [Secret
|
|||||||
## 🚀 Quick Start / Deployment
|
## 🚀 Quick Start / Deployment
|
||||||
|
|
||||||
### 1. Installation & Bare-Metal Recovery
|
### 1. Installation & Bare-Metal Recovery
|
||||||
For fresh machine setup and disaster recovery, follow the [Getting Started & Disaster Recovery Runbook](docs/getting-started.md).
|
For fresh machine setup and disaster recovery, follow the [Getting Started: Fresh Installation & Recovery Runbook](docs/getting-started.md).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/kiskaadee/nixos-config.git ~/Config
|
git clone https://github.com/kiskaadee/nixos-config.git ~/Config
|
||||||
@@ -124,7 +124,7 @@ sudo nixos-rebuild switch --flake ~/Config#laptop
|
|||||||
|
|
||||||
## 📚 Workstation Operations Manual
|
## 📚 Workstation Operations Manual
|
||||||
|
|
||||||
* [Getting Started & Disaster Recovery](docs/getting-started.md) — Bare-metal install, partition scheme, hardware config, and desktop bootstrap.
|
* [Getting Started: Fresh Installation & Recovery](docs/getting-started.md) — Bare-metal install, reference partitioning, hardware config, and desktop bootstrap.
|
||||||
* [Adding Software](docs/adding-software.md) — Decision tree for package placement, `home.packages` vs `programs.foo`, and unfree packages.
|
* [Adding Software](docs/adding-software.md) — Decision tree for package placement, `home.packages` vs `programs.foo`, and unfree packages.
|
||||||
* [Configuration Workflow](docs/configuration.md) — Day-to-day editing, dry-build validation, testing, and dotfiles management.
|
* [Configuration Workflow](docs/configuration.md) — Day-to-day editing, dry-build validation, testing, and dotfiles management.
|
||||||
* [System Lifecycle & Rebuilds](docs/system-lifecycle.md) — Nix rebuild pipeline, generations, bootloader rollback, and garbage collection.
|
* [System Lifecycle & Rebuilds](docs/system-lifecycle.md) — Nix rebuild pipeline, generations, bootloader rollback, and garbage collection.
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
This repository manages a purely declarative NixOS and Home Manager configuration for a standalone mobile workstation host (`laptop`).
|
This repository manages a purely declarative NixOS and Home Manager configuration for a standalone mobile workstation host (`laptop`).
|
||||||
|
|
||||||
1. **Git is the Source of Truth for Configuration**: Every persistent configuration decision intended to be reproducible is declaratively defined within this repository. Dynamic runtime state (SSH host private keys, machine-id, user application state, caches, browser profiles, and Docker volumes) lives outside the declarative boundary.
|
1. **Declarative System State vs. Mutable Runtime State**: Reproducibility in this repository means **reproducible declared system state**, not necessarily byte-for-byte reproducible runtime/user state. The workstation is **declaratively reproducible, with an explicitly documented desktop bootstrap state**. Dynamic runtime state (SSH host private keys, machine-id, DMS runtime settings and monitor layouts, browser profiles, caches, and Docker volumes) lives outside the declarative boundary. A runtime-mutated file must never be converted into a Home Manager-managed file merely because it is important or because tracking it in Git would appear to improve reproducibility.
|
||||||
2. **Domain-Driven Cohesion**: Configuration is organized by functional domain (`core`, `hardware`, `desktop`, `dev`, `shell`) rather than artificial multi-machine abstractions.
|
2. **Domain-Driven Cohesion**: Configuration is organized by functional domain (`core`, `hardware`, `desktop`, `dev`, `shell`) rather than artificial multi-machine abstractions.
|
||||||
3. **Privilege Boundary Separation**:
|
3. **Privilege Boundary Separation**:
|
||||||
- **`system/` (Root/NixOS)**: Governs hardware, kernel, bootloader, base OS daemons, and system-level compositor enablement.
|
- **`system/` (Root/NixOS)**: Governs hardware, kernel, bootloader, base OS daemons, and system-level compositor enablement.
|
||||||
|
|||||||
@@ -79,6 +79,12 @@ Used for tools that provide their own GUI settings editor or dynamic state:
|
|||||||
|
|
||||||
These directories are **deliberately unmanaged by Home Manager**. They are modified interactively through their respective applications without interference from `nixos-rebuild switch`.
|
These directories are **deliberately unmanaged by Home Manager**. They are modified interactively through their respective applications without interference from `nixos-rebuild switch`.
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> **Repository Principle: Declared Reproducibility vs. Runtime State**
|
||||||
|
> Reproducibility in this repository means **reproducible declared system state**, not necessarily byte-for-byte reproducible runtime user state. The workstation is **declaratively reproducible, with an explicitly documented desktop bootstrap state**.
|
||||||
|
>
|
||||||
|
> A runtime-mutated file must never be converted into a Home Manager-managed store symlink merely because it is important or because tracking it in Git would appear to improve reproducibility. Doing so fights the application's runtime mutation model and causes permission errors or broken symlinks.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 4. Git Hygiene & Pre-Commit Checks
|
## 4. Git Hygiene & Pre-Commit Checks
|
||||||
|
|||||||
+31
-22
@@ -26,7 +26,7 @@ graph TD
|
|||||||
end
|
end
|
||||||
|
|
||||||
subgraph "DMS Runtime State (Mutable)"
|
subgraph "DMS Runtime State (Mutable)"
|
||||||
DMS --> BINDS["~/.config/niri/dms/binds.kdl<br/><i>(Baseline & GUI shortcuts)</i>"]
|
DMS --> BINDS["~/.config/niri/dms/binds.kdl<br/><i>(DMS-managed Niri IPC bindings)</i>"]
|
||||||
DMS --> SETTINGS["~/.config/DankMaterialShell/settings.json<br/><i>(Panels, widgets, themes)</i>"]
|
DMS --> SETTINGS["~/.config/DankMaterialShell/settings.json<br/><i>(Panels, widgets, themes)</i>"]
|
||||||
DMS --> DYN["~/.config/niri/dms/outputs.kdl & colors.kdl<br/><i>(Monitors, Matugen theme)</i>"]
|
DMS --> DYN["~/.config/niri/dms/outputs.kdl & colors.kdl<br/><i>(Monitors, Matugen theme)</i>"]
|
||||||
end
|
end
|
||||||
@@ -44,19 +44,22 @@ A critical architectural invariant is respecting the distinction between **decla
|
|||||||
| :--- | :--- | :--- | :--- | :--- |
|
| :--- | :--- | :--- | :--- | :--- |
|
||||||
| **Declarative Core** | `home/config/niri/config.kdl`<br/>`home/config/niri/custom.kdl` | **Yes** | Immutable store symlinks | Governs compositor rules, gesture bindings, and personal shortcuts. |
|
| **Declarative Core** | `home/config/niri/config.kdl`<br/>`home/config/niri/custom.kdl` | **Yes** | Immutable store symlinks | Governs compositor rules, gesture bindings, and personal shortcuts. |
|
||||||
| **System Daemon** | `system/desktop.nix` | **Yes** | Immutable NixOS module | Enables Niri, DMS package, Greetd greeter, fonts. |
|
| **System Daemon** | `system/desktop.nix` | **Yes** | Immutable NixOS module | Enables Niri, DMS package, Greetd greeter, fonts. |
|
||||||
| **DMS Keybindings** | `~/.config/niri/dms/binds.kdl` | **No** (Seeded) | Mutable (`0644`) | Initialized via `dms setup binds`. Editable in DMS Settings GUI. |
|
| **DMS Niri IPC Bindings** | `~/.config/niri/dms/binds.kdl` | **No** (Bootstrap-owned) | Mutable (`0644`) | Initialized via `dms setup binds`. Bridges Niri to DMS runtime controls; editable via GUI/CLI. |
|
||||||
| **DMS UI Preferences** | `~/.config/DankMaterialShell/settings.json` | **No** | Mutable | Stores user's bar widget selections, padding, and corner radius. |
|
| **DMS UI Preferences** | `~/.config/DankMaterialShell/settings.json` | **No** | Mutable | Stores user's bar widget selections, padding, and corner radius. |
|
||||||
| **Display Outputs** | `~/.config/niri/dms/outputs.kdl` | **No** | Dynamic runtime | Generated by DMS when external displays are connected/repositioned. |
|
| **Display Outputs** | `~/.config/niri/dms/outputs.kdl` | **No** | Dynamic runtime | Generated by DMS when external displays are connected/repositioned. |
|
||||||
| **Color Schemes** | `~/.config/niri/dms/colors.kdl` | **No** | Dynamic runtime | Extracted by Matugen from the active wallpaper. |
|
| **Color Schemes** | `~/.config/niri/dms/colors.kdl` | **No** | Dynamic runtime | Extracted by Matugen from the active wallpaper. |
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> `binds.kdl` is not part of the declarative workstation configuration. It is a bootstrap-owned artifact whose initial contents are established by `dms setup binds`. It serves as the bridge between Niri and DMS's runtime controls (the DMS-managed Niri IPC integration bindings). An empty or missing file disconnects a substantial portion of the desktop's control surface.
|
||||||
|
|
||||||
> [!CAUTION]
|
> [!CAUTION]
|
||||||
> Do not attempt to manage `~/.config/niri/dms/` or `~/.config/DankMaterialShell/settings.json` via Home Manager symlinks. Doing so breaks DMS's runtime ability to persist display changes, theme updates, and interactive settings.
|
> Do not attempt to manage `~/.config/niri/dms/` or `~/.config/DankMaterialShell/settings.json` via Home Manager store symlinks. Doing so breaks DMS's runtime ability to persist display changes, theme updates, and interactive settings.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 3. Desktop Initialization (Fresh Install)
|
## 3. Desktop Initialization (Fresh User Profile)
|
||||||
|
|
||||||
On a fresh machine or new user profile, seed the baseline mutable keybindings with:
|
On a fresh user profile (or after recreating `$HOME`), initialize the mutable baseline keybindings with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dms setup binds
|
dms setup binds
|
||||||
@@ -68,41 +71,47 @@ This ensures `~/.config/niri/dms/binds.kdl` is created with proper user write pe
|
|||||||
|
|
||||||
## 4. Master Shortcut Reference
|
## 4. Master Shortcut Reference
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> **Precedence Rule**: In `config.kdl`, `include "custom.kdl"` is evaluated *after* `include optional=true "dms/binds.kdl"`. Where key definitions collide, `custom.kdl` overrides DMS defaults. Specifically:
|
||||||
|
> - `Mod+O` launches Obsidian (overriding DMS's secondary overview shortcut; toggle overview via `Mod+Tab`).
|
||||||
|
> - `Mod+W` triggers area screen recording (overriding DMS's column tabbed display toggle).
|
||||||
|
|
||||||
### Core Applications & Session
|
### Core Applications & Session
|
||||||
| Shortcut | Action | Scope |
|
| Shortcut | Action | Source | Precedence Note |
|
||||||
| :--- | :--- | :--- |
|
| :--- | :--- | :--- | :--- |
|
||||||
| `Mod+Return` | Open Alacritty Terminal | Custom (`custom.kdl`) |
|
| `Mod+Return` | Open Alacritty Terminal | Custom (`custom.kdl`) | Primary workstation terminal. |
|
||||||
| `Mod+T` | Open Terminal | DMS Default (`binds.kdl`) |
|
| `Mod+T` | Open Terminal | DMS IPC (`binds.kdl`) | Alternative terminal launcher. |
|
||||||
| `Mod+B` | Launch Firefox Browser | Custom (`custom.kdl`) |
|
| `Mod+B` | Launch Firefox Browser | Custom (`custom.kdl`) | Browser shortcut. |
|
||||||
| `Mod+O` | Launch Obsidian Notes | Custom (`custom.kdl`) |
|
| `Mod+O` | Launch Obsidian Notes | Custom (`custom.kdl`) | Overrides DMS `Mod+O` overview. |
|
||||||
| `Mod+Space` / `Alt+Space` | Toggle Spotlight Application Launcher | DMS IPC (`binds.kdl`) |
|
| `Mod+Tab` | Toggle Niri Column Overview | DMS IPC (`binds.kdl`) | Primary overview trigger. |
|
||||||
| `Mod+V` | Toggle Clipboard Manager | DMS IPC (`binds.kdl`) |
|
| `Mod+Space` / `Alt+Space` | Toggle Spotlight Application Launcher | DMS IPC (`binds.kdl`) | DMS app launcher modal. |
|
||||||
| `Mod+M` | Toggle Task Manager / Process List | DMS IPC (`binds.kdl`) |
|
| `Mod+V` | Toggle Clipboard Manager | DMS IPC (`binds.kdl`) | DMS clipboard history modal. |
|
||||||
| `Super+X` | Toggle Power Menu (Lock / Suspend / Shutdown) | DMS IPC (`binds.kdl`) |
|
| `Mod+M` | Toggle Task Manager / Process List | DMS IPC (`binds.kdl`) | DMS process manager. |
|
||||||
| `Mod+Comma` | Open DMS Settings Modal | DMS IPC (`binds.kdl`) |
|
| `Super+X` | Toggle Power Menu (Lock / Suspend / Shutdown) | DMS IPC (`binds.kdl`) | DMS session menu. |
|
||||||
| `Mod+Tab` / `Mod+O` | Toggle Niri Column Overview | DMS IPC (`binds.kdl`) |
|
| `Mod+Comma` | Open DMS Settings Modal | DMS IPC (`binds.kdl`) | Interactive desktop settings. |
|
||||||
| `Mod+Shift+E` | Quit Niri Session | Niri Native (`binds.kdl`) |
|
| `Mod+Shift+E` | Quit Niri Session | Niri Native (`binds.kdl`) | Exits Wayland compositor. |
|
||||||
|
|
||||||
### Window Management & Resizing
|
### Window Management & Resizing
|
||||||
| Shortcut | Action | Scope |
|
| Shortcut | Action | Source |
|
||||||
| :--- | :--- | :--- |
|
| :--- | :--- | :--- |
|
||||||
| `Mod+Q` | Close Active Window | DMS IPC (`binds.kdl`) |
|
| `Mod+Q` | Close Active Window | DMS IPC (`binds.kdl`) |
|
||||||
| `Mod+Shift+Q` | Force Kill Focused Window Process (`kill -9`) | Custom (`custom.kdl`) |
|
| `Mod+Shift+Q` | Force Kill Focused Window Process (`kill -9`) | Custom (`custom.kdl`) |
|
||||||
| `Mod+F` | Maximize Focused Column | DMS IPC (`binds.kdl`) |
|
| `Mod+F` | Maximize Focused Column | DMS IPC (`binds.kdl`) |
|
||||||
| `Mod+Shift+F` | Fullscreen Window | DMS IPC (`binds.kdl`) |
|
| `Mod+Shift+F` | Fullscreen Window | DMS IPC (`binds.kdl`) |
|
||||||
| `Mod+Shift+T` | Toggle Window Floating | DMS IPC (`binds.kdl`) |
|
| `Mod+Shift+T` | Toggle Window Floating | DMS IPC (`binds.kdl`) |
|
||||||
| `Mod+W` | Toggle Column Tabbed Display | DMS IPC (`binds.kdl`) |
|
| `Mod+Shift+W` | Create DMS Window Rule | DMS IPC (`binds.kdl`) |
|
||||||
| `Mod+Alt+Right / Left` | Expand / Shrink Column Width (+/- 100px) | Custom (`custom.kdl`) |
|
| `Mod+Alt+Right / Left` | Expand / Shrink Column Width (+/- 100px) | Custom (`custom.kdl`) |
|
||||||
| `Mod+Alt+Down / Up` | Expand / Shrink Window Height (+/- 100px) | Custom (`custom.kdl`) |
|
| `Mod+Alt+Down / Up` | Expand / Shrink Window Height (+/- 100px) | Custom (`custom.kdl`) |
|
||||||
|
|
||||||
### Screenshots, Screen Recording & Utilities
|
### Screenshots, Screen Recording & Utilities
|
||||||
| Shortcut | Action | Scope |
|
| Shortcut | Action | Source |
|
||||||
| :--- | :--- | :--- |
|
| :--- | :--- | :--- |
|
||||||
| `Mod+S` | Interactive Area Screenshot | Custom (`custom.kdl`) |
|
| `Mod+S` | Interactive Area Screenshot | Custom (`custom.kdl`) |
|
||||||
| `Mod+Shift+S` | Screenshot Active Window | Custom (`custom.kdl`) |
|
| `Mod+Shift+S` | Screenshot Active Window | Custom (`custom.kdl`) |
|
||||||
| `Mod+Alt+S` | Screenshot Full Screen | Custom (`custom.kdl`) |
|
| `Mod+Alt+S` | Screenshot Full Screen | Custom (`custom.kdl`) |
|
||||||
| `Mod+W` | Record Selected Screen Area (wf-recorder) | Custom (`custom.kdl`) |
|
| `Mod+W` | Record Selected Screen Area (wf-recorder) | Custom (`custom.kdl`, overrides tabbed column) |
|
||||||
| `Mod+Shift+W` | Record Focused Monitor | Custom (`custom.kdl`) |
|
| `Mod+Shift+W` | Record Focused Monitor | Custom (`custom.kdl`) |
|
||||||
| `Mod+Ctrl+W` | Record Selected Area + Audio | Custom (`custom.kdl`) |
|
| `Mod+Ctrl+W` | Record Selected Area + Audio | Custom (`custom.kdl`) |
|
||||||
|
| `Mod+Ctrl+Shift+W` | Record Focused Monitor + Audio | Custom (`custom.kdl`) |
|
||||||
| `Mod+Shift+C` | Eyedropper Color Picker (copies HEX to clipboard) | Custom (`custom.kdl`) |
|
| `Mod+Shift+C` | Eyedropper Color Picker (copies HEX to clipboard) | Custom (`custom.kdl`) |
|
||||||
| `Mod+Ctrl+Shift+R` | Hot-Reload Niri Configuration | Custom (`custom.kdl`) |
|
| `Mod+Ctrl+Shift+R` | Hot-Reload Niri Configuration | Custom (`custom.kdl`) |
|
||||||
+15
-6
@@ -1,6 +1,6 @@
|
|||||||
# 🚀 Getting Started & Disaster Recovery
|
# 🚀 Getting Started: Fresh Installation & Recovery
|
||||||
|
|
||||||
This document is the operational procedure for bootstrapping the workstation host (`laptop`) from bare metal or recovering after a catastrophic drive failure.
|
This document is the operational procedure for bootstrapping the workstation host (`laptop`) from bare metal or recovering after a drive replacement.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -17,6 +17,10 @@ This document is the operational procedure for bootstrapping the workstation hos
|
|||||||
|
|
||||||
## 2. Disk Partitioning & Mounting
|
## 2. Disk Partitioning & Mounting
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> **Example Reference Partitioning Layout**
|
||||||
|
> The following partitioning recipe is a standard reference layout for a clean NVMe drive. If recovering an existing drive, or using Btrfs, ZFS, or LUKS encryption, adjust partition identifiers and mount existing subvolumes/filesystems accordingly. The actual filesystem UUIDs and mount options will be captured into `system/hardware-configuration.nix` in the next step.
|
||||||
|
|
||||||
Assuming NVMe target drive `/dev/nvme0n1`:
|
Assuming NVMe target drive `/dev/nvme0n1`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -82,15 +86,20 @@ reboot
|
|||||||
3. Open a terminal (`Mod+Return`).
|
3. Open a terminal (`Mod+Return`).
|
||||||
|
|
||||||
### Desktop Initialization Phase
|
### Desktop Initialization Phase
|
||||||
On a fresh machine, DMS requires a one-time setup command to seed its mutable baseline keybindings:
|
On a fresh user profile (or after recreating `$HOME`), initialize DMS's mutable baseline keybindings with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dms setup binds
|
dms setup binds
|
||||||
```
|
```
|
||||||
|
|
||||||
This generates `~/.config/niri/dms/binds.kdl` with standard user write permissions (`0644`). From this point forward:
|
This generates `~/.config/niri/dms/binds.kdl` with standard user write permissions (`0644`).
|
||||||
- Niri loads all standard DMS IPC shortcuts (`Mod+Space` for spotlight launcher, `Mod+V` for clipboard, `Mod+M` for task manager, `Super+X` for power menu, volume and brightness controls).
|
|
||||||
- DMS owns, updates, and mutates `~/.config/niri/dms/` and `~/.config/DankMaterialShell/settings.json` without conflicting with the declarative Nix store.
|
> [!IMPORTANT]
|
||||||
|
> `binds.kdl` is not part of the declarative workstation configuration. It is a bootstrap-owned artifact whose initial contents are established by `dms setup binds`, establishing the DMS-managed Niri IPC integration bindings. Subsequent edits via the DMS Settings GUI or CLI mutate this file directly.
|
||||||
|
>
|
||||||
|
> From this point forward:
|
||||||
|
> - Niri loads all standard DMS IPC shortcuts (`Mod+Space` for spotlight launcher, `Mod+V` for clipboard, `Mod+M` for task manager, `Super+X` for power menu, volume and brightness controls).
|
||||||
|
> - DMS owns, updates, and mutates `~/.config/niri/dms/` and `~/.config/DankMaterialShell/settings.json` without conflicting with the declarative Nix store.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
+44
-21
@@ -1,42 +1,65 @@
|
|||||||
# 🪟 Tmux Reference & Workflow
|
# 🪟 Tmux Reference & Workflow
|
||||||
|
|
||||||
This document describes the Tmux terminal multiplexer configuration declared in `home/shell.nix` and `home/config/tmux/tmux.conf`.
|
This document describes the Tmux terminal multiplexer configuration declared in `home/shell.nix` and `home/config/tmux.conf`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 1. Core Configuration
|
## 1. Core Configuration
|
||||||
|
|
||||||
- **Prefix Key**: `Ctrl+A` (remapped from standard `Ctrl+B`).
|
- **Prefix Key**: `Ctrl+Space` (`C-Space`, remapped from standard `Ctrl+B`).
|
||||||
- **Terminal Capabilities**: TrueColor (`tmux-256color`) with RGB support.
|
- **Terminal Capabilities**: TrueColor (`tmux-256color`) with RGB support and extended keys enabled.
|
||||||
- **Mouse Support**: Enabled for scrolling, pane selection, and resizing.
|
- **Mouse Support**: Enabled for scrolling, pane selection, and resizing.
|
||||||
- **Base Index**: Windows and panes start at index `1` instead of `0`.
|
- **Base Index**: Windows and panes start at index `1` (matching keyboard row `1..9`).
|
||||||
|
- **Escape Time**: `0ms` (zero delay for responsive escape-key behavior in Vim/Neovim).
|
||||||
|
- **Clipboard**: OSC 52 integration enabled (`set -s set-clipboard on`), syncing clipboard locally and over SSH.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 2. Keybindings & Controls
|
## 2. Keybindings & Controls
|
||||||
|
|
||||||
### Pane Management
|
### Smart Neovim / Tmux Navigation (No Prefix Required)
|
||||||
| Shortcut | Action |
|
Thanks to `vim-tmux-navigator` integration, you can navigate seamlessly between Vim splits and Tmux panes without pressing the prefix key:
|
||||||
| :--- | :--- |
|
|
||||||
| `Ctrl+A \|` | Split window horizontally. |
|
|
||||||
| `Ctrl+A -` | Split window vertically. |
|
|
||||||
| `Ctrl+A h / j / k / l` | Navigate left, down, up, right (Vim style). |
|
|
||||||
| `Ctrl+A H / J / K / L` | Resize pane left, down, up, right. |
|
|
||||||
| `Ctrl+A z` | Toggle full-screen zoom on current pane. |
|
|
||||||
| `Ctrl+A x` | Kill active pane. |
|
|
||||||
|
|
||||||
### Window Management
|
|
||||||
| Shortcut | Action |
|
| Shortcut | Action |
|
||||||
| :--- | :--- |
|
| :--- | :--- |
|
||||||
| `Ctrl+A c` | Create new window. |
|
| `Ctrl+h` | Move to left pane / Vim split. |
|
||||||
| `Ctrl+A n` | Next window. |
|
| `Ctrl+j` | Move to down pane / Vim split. |
|
||||||
| `Ctrl+A p` | Previous window. |
|
| `Ctrl+k` | Move to up pane / Vim split. |
|
||||||
| `Ctrl+A 1..9` | Switch directly to window number. |
|
| `Ctrl+l` | Move to right pane / Vim split. |
|
||||||
| `Ctrl+A ,` | Rename current window. |
|
|
||||||
|
*(Fallback navigation using prefix: `Ctrl+Space h/j/k/l`)*
|
||||||
|
|
||||||
|
### Pane Management (Prefix: `Ctrl+Space`)
|
||||||
|
| Shortcut | Action |
|
||||||
|
| :--- | :--- |
|
||||||
|
| `Ctrl+Space \|` | Split window horizontally (opens in current working directory). |
|
||||||
|
| `Ctrl+Space -` | Split window vertically (opens in current working directory). |
|
||||||
|
| `Ctrl+Space H / J / K / L` | Resize pane left, down, up, right by 5 cells. |
|
||||||
|
| `Ctrl+Space z` | Toggle full-screen zoom on active pane. |
|
||||||
|
| `Ctrl+Space x` | Kill active pane. |
|
||||||
|
|
||||||
|
### Window Management (Prefix: `Ctrl+Space`)
|
||||||
|
| Shortcut | Action |
|
||||||
|
| :--- | :--- |
|
||||||
|
| `Ctrl+Space c` | Create new window. |
|
||||||
|
| `Ctrl+Space n` | Next window. |
|
||||||
|
| `Ctrl+Space p` | Previous window. |
|
||||||
|
| `Ctrl+Space 1..9` | Switch directly to window index `1..9`. |
|
||||||
|
| `Ctrl+Space ,` | Rename current window. |
|
||||||
|
| `Ctrl+Space r` | Reload `~/.config/tmux/tmux.conf`. |
|
||||||
|
|
||||||
|
### Copy Mode (Vi-Style)
|
||||||
|
| Shortcut | Action |
|
||||||
|
| :--- | :--- |
|
||||||
|
| `Ctrl+Space Escape` | Enter copy mode. |
|
||||||
|
| `v` | Begin text selection (in copy mode). |
|
||||||
|
| `Ctrl+v` | Toggle rectangle / block selection. |
|
||||||
|
| `y` | Copy selection to system clipboard (via OSC 52) and exit copy mode. |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 3. Persistent Sessions
|
## 3. Persistent Sessions
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Attach or create session named "dev":
|
# Attach or create session named "dev":
|
||||||
tmux new-session -A -s dev
|
tmux new-session -A -s dev
|
||||||
@@ -44,6 +67,6 @@ tmux new-session -A -s dev
|
|||||||
# List active sessions:
|
# List active sessions:
|
||||||
tmux ls
|
tmux ls
|
||||||
|
|
||||||
# Detach from session:
|
# Detach from active session:
|
||||||
Ctrl+A d
|
Ctrl+Space d
|
||||||
```
|
```
|
||||||
Reference in new issue
Block a user