cmux/docs-site/content/docs/splits.mdx
Lawrence Chen 9817d131f8
Release v1.23.0 (#31)
* Rename cmuxterm to cmux across entire codebase

- Rename GitHub repos: manaflow-ai/cmuxterm -> manaflow-ai/cmux,
  manaflow-ai/homebrew-cmuxterm -> manaflow-ai/homebrew-cmux
- Rename bundle IDs: com.cmuxterm.app -> com.cmux.app
- Rename CLI: CLI/cmuxterm.swift -> CLI/cmux.swift
- Rename homebrew submodule: homebrew-cmuxterm -> homebrew-cmux
- Update all socket paths: /tmp/cmuxterm*.sock -> /tmp/cmux*.sock
- Update all GitHub URLs, DMG names, Sparkle URLs
- Update all source files, scripts, tests, docs, CI workflows

* Bump version to 1.23.0
2026-02-09 15:30:43 -08:00

111 lines
2.4 KiB
Text

---
title: Split Panes
description: Working with split panes in cmux
---
# Split Panes
cmux supports splitting terminal panes within a tab, allowing you to view multiple terminals side by side.
## Creating Splits
### Keyboard Shortcuts
| Shortcut | Action |
|----------|--------|
| **⌘D** | Split right |
| **⌘⇧D** | Split down |
### Using the CLI
```bash
# Split in a specific direction
cmux new-split right
cmux new-split down
cmux new-split left
cmux new-split up
```
## Navigating Splits
### Keyboard
Use **⌘⌥** + arrow keys to move between splits:
| Shortcut | Action |
|----------|--------|
| **⌘⌥←** | Focus left pane |
| **⌘⌥→** | Focus right pane |
| **⌘⌥↑** | Focus pane above |
| **⌘⌥↓** | Focus pane below |
### CLI
```bash
# List all panes in current tab
cmux list-panels
# Focus a specific pane
cmux focus-panel --panel <panel-id>
```
## Closing Splits
- **⌘W** - Close the focused pane
- If only one pane remains, **⌘W** closes the tab
## Visual Styling
Unfocused panes are visually distinguished to help you identify the active pane.
### Configuration
In your Ghostty config:
```ini
# Dim unfocused panes (0.0 = fully dimmed, 1.0 = no dimming)
unfocused-split-opacity = 0.7
# Background fill for unfocused panes
unfocused-split-fill = #1e1e2e
# Color of the divider between panes
split-divider-color = #45475a
```
## Split Layout
cmux uses a binary split tree structure:
- Each split creates two child panes
- Nested splits create a tree of panes
- Each pane has a unique `panel-id` for CLI access
### Example Layout
```
┌────────────────────────────────┐
│ Tab 1 │
├──────────────┬─────────────────┤
│ │ Pane 2 │
│ Pane 1 ├─────────────────┤
│ │ Pane 3 │
└──────────────┴─────────────────┘
```
This layout is created by:
1. Split right → Pane 1 | Pane 2
2. Focus Pane 2
3. Split down → Pane 2 | Pane 3
## Sending Input to Specific Panes
With the CLI, you can send input to specific panes:
```bash
# Send text to a specific pane
cmux send-panel --panel <panel-id> "echo hello"
# Send a keypress to a specific pane
cmux send-key-panel --panel <panel-id> enter
```