Help us shape the future of Go! Take the 2026 Go Developer Survey

multiplexer

package
v0.65.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package multiplexer defines implementation-neutral terminal multiplexer values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachStreams

type AttachStreams struct {
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer
}

AttachStreams are connected directly to an interactive multiplexer client.

type CaptureOptions

type CaptureOptions struct {
	JoinWrappedLines bool
	StartLine        *int
	EndLine          *int
}

CaptureOptions controls pane capture behavior.

type LaunchResult added in v0.63.0

type LaunchResult struct {
	Created   bool
	Completed bool
}

LaunchResult describes a session open or launch. Completed is true only when every pane completed successfully and the launch left no terminal to attach to.

type NamedKey

type NamedKey string

NamedKey is one tmux named-key token.

func NewNamedKey

func NewNamedKey(value string) (NamedKey, error)

NewNamedKey validates a named key for safe argv transport.

type Pane

type Pane struct {
	// Target is the session:window.pane address at discovery time. Window and
	// pane indexes can shift when neighbours close, so it is not stable.
	Target Target
	// NativeID is the multiplexer's own stable pane identifier (tmux %N). It
	// survives window and pane renumbering, unlike Target.
	NativeID string
	// PID is the process ID of the pane's root process (usually the shell).
	PID int64
	// WindowName is the display name of the window that holds the pane.
	WindowName string
	// Title is the pane title, which agents often set to their own name.
	Title string
	// WorkingDirectory is the current directory of the pane's root process.
	WorkingDirectory string
	// Activity is the Unix timestamp of the last output in the pane's window.
	Activity int64
	// HiveSession is the Hive slug tagged on the pane when Hive created it
	// (tmux @hive-session). It lets Hive find a session after a user renames
	// the multiplexer session.
	HiveSession string
	// InMode reports whether the pane is in copy or view mode, so its visible
	// content is scrollback rather than live output.
	InMode bool
}

Pane describes a discovered multiplexer pane.

type PaneSpec

type PaneSpec struct {
	Command          string
	WorkingDirectory string
	Size             string
	Split            SplitDirection
}

PaneSpec is a fully rendered pane definition.

type PasteOptions

type PasteOptions struct {
	Bracketed bool
}

PasteOptions controls buffer paste behavior.

type SessionSpec

type SessionSpec struct {
	Target           Target
	WorkingDirectory string
	Windows          []WindowSpec
	Background       bool
	// Env holds KEY=VALUE pairs for the new session's environment, which
	// every pane in the session inherits.
	Env []string
}

SessionSpec describes a session and its initial windows.

type SplitDirection

type SplitDirection string

SplitDirection controls the orientation of a pane split.

const (
	SplitVertical   SplitDirection = "vertical"
	SplitHorizontal SplitDirection = "horizontal"
)

type Target

type Target struct {
	Session string
	Window  string
	Pane    string
}

Target identifies a session, window, or pane. A pane target can contain only Pane when the multiplexer supplied a stable native pane identifier.

func (Target) ValidatePane

func (t Target) ValidatePane() error

ValidatePane validates a qualified or stable native pane target.

func (Target) ValidateSession

func (t Target) ValidateSession() error

ValidateSession validates a session target.

func (Target) ValidateWindow

func (t Target) ValidateWindow() error

ValidateWindow validates a qualified window target.

type WindowSpec

type WindowSpec struct {
	Name             string
	Command          string
	WorkingDirectory string
	Focus            bool
	Panes            []PaneSpec
}

WindowSpec is a fully rendered window definition.

Jump to

Keyboard shortcuts

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