tmux is a production-grade terminal multiplexer written in C with a client-server architecture. The server process manages sessions, windows, and panes (each backed by a PTY), while client processes connect over a Unix socket and communicate via a versioned imsg-based protocol (PROTOCOL_VERSION 8). The codebase is organized into command dispatch (cmd_entry structs), a grid-based screen buffer with history and reflow, a scene-cached redraw engine, a terminal I/O layer (tty.c) with terminfo parsing and feature negotiation, and an extensive options/hooks/events system. Entry points are tmux.c (main), server.c (event loop), and the control protocol for programmatic clients. Externally it depends on libevent, terminfo, and POSIX/BSD PTY APIs, with a compat/ layer shimming missing functions across a dozen platforms.
Zellij is a high-craft terminal multiplexer written in Rust, offering a client-server architecture with native and web clients. It manages terminals, panes, tabs, and sessions with full VT emulation, mouse support, and a plugin system based on WebAssembly. The server handles panes (tiled, floating, stacked), PTY I/O, scrollback, search, sixel/Kitty graphics, and session serialization for resurrection. Plugins (built-in: bars, strider, configuration, prompt, session-manager, etc.) extend the UI via a widget framework with serialization through ANSI DCS escapes. The client processes keyboard/mouse input, provides a web client with xterm.js and WebSocket transport, and supports remote attach with token-based auth. The codebase is exceptionally well-tested (unit + integration test suites, snapshot-based), with clean trait abstractions (ClientOsApi, ServerOsApi, ZellijPlugin) and a custom build system (xtask). It is not a data/research repository.
Herdr is a terminal workspace manager designed for AI coding agents. It features a client-server architecture where a persistent background server manages terminal panes, workspaces, and tabs, while thin clients (TUI and CLI) connect via Unix sockets/named pipes. The system enables detaching and reattaching sessions without losing agent state, provides agent-native control through CLI/socket API for spawning and managing AI agents (Claude, Codex, Copilot, etc.), and maintains session persistence across restarts and network disruptions. It includes a plugin system for extensibility, comprehensive AI agent integrations, and a rich terminal interface built with Ratatui.
This repository provides a comprehensive, self-contained tmux configuration known as 'Oh my tmux!'. It is a single `.tmux.conf` file with an embedded shell script that dynamically applies themes, key bindings, pane management, status line widgets (battery, uptime, load average, SSH-aware hostname/username), clipboard integration, and plugin management via tpm. The configuration is highly customizable through a separate `.tmux.conf.local` file. The code demonstrates advanced tmux scripting techniques, including conditional version checks, Unicode escape handling, and background processes for status updates. While the configuration is tightly coupled to tmux and not reusable as a standalone library, the shell functions for battery bars, uptime, and SSH detection exhibit high craftsmanship and could inform similar tmux configurations. The repository also includes an install script and detailed documentation.
This is a Zellij plugin that provides quick filtering and switching between terminal tabs and panes, inspired by the original harpoon for Neovim. It maintains a user-defined list of 'bookmarked' panes (identified by session-unique IDs) and allows adding, removing, and navigating to them via keyboard shortcuts. The plugin persists the bookmarked pane list to disk using shell commands so that the list survives session restarts. The architecture is a minimal single-threaded state machine that reacts to Zellij events (key presses, tab/line updates, session changes). All logic resides in two Rust source files: main.rs for the plugin lifecycle and event handling, and persistence.rs for loading/saving bookmarks via JSON files. The code is well-commented with references to the official Zellij API documentation. The codebase is small and focused, and demonstrates disciplined use of the plugin framework.
ClusterSSH is a Perl-based cluster administration tool that provides a graphical console (using Tk) to manage multiple SSH (or other protocol) sessions simultaneously. It allows users to define clusters via configuration files, expand hostnames using shell-style ranges, and replicate keystrokes from a master console to all connected terminal windows. The architecture is monolithic, centered around the App::ClusterSSH module, with distinct sub-modules handling configuration, cluster resolution, host parsing, and window management via X11::Protocol. It relies heavily on the X11 protocol for event injection into child xterm processes, making it tightly coupled to X11 environments but highly effective for its specific use case of synchronized cluster management.