tmux

package
v2.0.0-rc05 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Path is the default path to the tmux executable on disk.
	Path = "/usr/bin/tmux"
	// SessionName is the string to use when naming a tmux session.
	SessionName = "mdrip"
)

Variables

This section is empty.

Functions

func IsProgramInstalled

func IsProgramInstalled(programName string) bool

IsProgramInstalled checks for tmux.

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

NewTmux is a ctor.

func (Tmux) Adapt

func (tx Tmux) Adapt(addr string)

Adapt opens a websocket to the given address, and sends what it gets to tmux. TODO: THIS STUFF ABANDONED FOR NOW AS THE USE CASE IS QUESTIONABLE.

func (Tmux) IsUp

func (tx Tmux) IsUp() bool

IsUp true if tmux appears to be running.

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