tmux

package
v2.0.0-rc13 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PgmName is the name of the tmux executable.
	PgmName = "tmux"
	// SessionName is the string to use when naming a tmux session.
	SessionName = utils.PgmName
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Tmux

type Tmux struct {
	// contains filtered or unexported fields
}

Tmux holds information about a tmux process (https://github.com/tmux/tmux).

func NewTmux

func NewTmux(programName string) (*Tmux, error)

NewTmux is a ctor.

func (Tmux) IsUp

func (tx Tmux) IsUp() bool

IsUp true if tmux appears to be running.

func (Tmux) ListSessions

func (tx Tmux) ListSessions() (string, error)

func (Tmux) Start

func (tx Tmux) Start() error

func (Tmux) Stop

func (tx Tmux) Stop() error

func (Tmux) Write

func (tx Tmux) Write(bytes []byte) (n int, err error)

Write bytes to a tmux session for interpretation as shell commands. Uses this kludge: * writes bytes to a temp file, * tells tmux to load that file into a tmux paste buffer, * then tells tmux to 'paste' it into a session. * yay tmux! TODO: look for a better tmux api (dbus?)

Jump to

Keyboard shortcuts

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