mux

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package mux defines common types and helpers for terminal multiplexers.

It provides a unified representation of panes, screen snapshots, and process references across different multiplexers such as tmux, Zellij, and Herdr.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoundBottomLines

func BoundBottomLines(text string, limit int) []string

BoundBottomLines normalizes line endings, strips any trailing empty line, and returns at most limit bottom lines.

Types

type Pane

type Pane struct {
	Location    registry.MultiplexerContext
	Processes   []ProcessRef
	ProcessTTY  string
	Command     string
	CWD         string
	Title       string
	Activity    *registry.Activity
	StateReason string
}

Pane is transient native multiplexer inventory. Only Location is persisted.

type PaneLister

type PaneLister func(context.Context) ([]Pane, error)

type ProcessRef

type ProcessRef struct {
	PID            int
	ProcessGroupID int
	Command        string
	CWD            string
}

ProcessRef identifies a process reported by a multiplexer for one pane. Start identity is resolved from the observer's own process snapshot.

type ScreenCapturer

type ScreenCapturer func(context.Context, Pane) (ScreenSnapshot, error)

type ScreenSnapshot

type ScreenSnapshot struct {
	Text  string
	Title string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL