No description
  • Rust 98.8%
  • Shell 1.2%
Find a file
d0rje 0cd1d24985 docs: fill in CLAUDE.md with build, release, and architecture info
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-08 13:33:33 -07:00
.beads docs: fill in CLAUDE.md with build, release, and architecture info 2026-06-08 13:33:33 -07:00
.claude bd init: initialize beads issue tracking 2026-06-06 23:07:28 -05:00
.forgejo/workflows gmux: drop macOS targets from release workflow 2026-06-08 12:54:19 -07:00
crates/ratatui-ghostty ratatui-ghostty: use libc pipe()+fcntl() instead of rustix pipe_with() 2026-06-08 12:34:00 -07:00
docs gmux: own the renderer + build the host/client wire foundation 2026-06-07 00:49:21 -05:00
src gmux: make the live multiplexer usable — theme rendering + OSC passthrough 2026-06-07 03:18:44 -05:00
.gitignore forgejo action test 2026-06-07 11:23:46 -07:00
.mise.toml gmux: add Forgejo release workflow — build + publish on tag push 2026-06-07 12:50:06 -07:00
AGENTS.md bd init: initialize beads issue tracking 2026-06-06 23:07:28 -05:00
Cargo.toml gmux: depend on upstream libghostty-vt master, drop fork + vendored copy 2026-06-07 14:11:44 -05:00
CLAUDE.md docs: fill in CLAUDE.md with build, release, and architecture info 2026-06-08 13:33:33 -07:00
LICENSE-APACHE Initial scaffold + single-shell MVP (gmux Phase 0+1+2) 2026-05-20 08:26:57 -05:00
LICENSE-MIT Initial scaffold + single-shell MVP (gmux Phase 0+1+2) 2026-05-20 08:26:57 -05:00
README.md gmux: own the renderer + build the host/client wire foundation 2026-06-07 00:49:21 -05:00
trigger.txt test pkg upload with hostgw 2026-06-07 20:42:54 +00:00

gmux

Routing terminal multiplexer that owns its window, uses libghostty-vt for inner-terminal state, and renders through its own ghostty-native backend (vendored in-repo at crates/ratatui-ghostty). Chrome (tab bar, status) is authored with ratatui.

Status: pre-alpha. Multiple shells in top-row tabs, each a libghostty-vt Terminal fed by its own PTY, rendered via the owned GhosttyBackend. Pending: session persistence / host-client split, and passthrough fidelity (kitty graphics, OSC 52 clipboard, palette/theme, OSC 133). Work is tracked in this repo's own bd database under epic gmux-io8.

Why this exists

This is the Path A pivot from a planned tmux-CC ↔ ghostty bridge. See docs/research/ghostty-tmux-cc-bridge/synthesis.md.

The headline finding: bridging tmux -CC into ghostty's native tabs is blocked by tmux #4302, ghostty #1935, and ghostty #12136. Owning the window and embedding libghostty-vt is the cleaner path.

Build & run

Requires Zig 0.15.2 (pinned via .mise.toml — installed automatically if you use mise).

mise install            # picks up zig 0.15.2 from .mise.toml
cargo build --release   # builds libghostty-vt-sys (vendors ghostty + zig build)
cargo run --release     # launches gmux (must run inside an outer terminal)

The resulting binary is self-contained (~7.5 MB stripped): libghostty-vt is statically linked, so there is no libghostty-vt.so to ship, no rpath, and no LD_LIBRARY_PATH wrapper. This relies on a local fork of libghostty-vt-sys at ../libghostty-vt-sys (wired via [patch.crates-io]) that emits a static archive and merges in the zig-built C++ deps + libc++/libc++abi. ldd on the output shows only glibc + libgcc_s. See gmux-io8.20 for the upstream PR to drop the fork.

Controls

  • Type into the active shell — keystrokes flow through (kitty keyboard).
  • Mouse, bracketed paste, and focus events are forwarded to the active pane.
  • Scroll wheel scrolls the inner terminal's scrollback (1000-line default).
  • Ctrl-T new tab · Ctrl-W close tab · Ctrl-PgUp/PgDn cycle · Ctrl-1..9 jump to tab · Ctrl-Q exit gmux.

Architecture

gmux (host process)
├── crates/ratatui-ghostty — owned GhosttyBackend (ghostty-native output +
│     EventStream input: kitty keyboard, OSC 8/52/133, undercurl, sync output)
├── libghostty-vt — one Terminal per pane, parses inner PTY output into cells
├── portable-pty — forks the shell, plumbs the PTY master fd
└── ratatui frame — top-row tab bar + active pane blitted into the body

crates/ratatui-ghostty was absorbed from a former standalone repo so gmux owns its renderer outright; the next step is to generalize it past ghostty-only (capability negotiation) — see gmux-io8.2.

Known limitations

  • Kitty graphics: renderer is text-cells only (gmux-io8.13).
  • Premium passthrough not wired yet: inner OSC 52 clipboard, palette/theme changes, and OSC 133 semantic prompts are currently dropped rather than forwarded to the outer terminal (gmux-io8.10 / .11 / .12).
  • libghostty-vt stderr noise: redirected to /tmp/gmux.log at startup.
  • Working name: gmux is provisional.

License

Dual-licensed under MIT or Apache-2.0.