tmux

package
v0.0.0-...-feba14f Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach

func Attach(name string) error

Attach attaches the current tmux instance to the given session.

NOTE: We can't use the `scripts` package because (for some unknown reason to me) tmux` requires that we bind `stdout`, `stderr`, and `stdin` to the spawned process for it to work.

func DisplaySessions

func DisplaySessions() (string, error)

DisplaySessions dynamically renders all the current active sessions and allows you to traverse to them.

func GetCurrentSession

func GetCurrentSession() (string, error)

GetCurrentSession returns the name of the current tmux session.

func HasSession

func HasSession(name string) error

HasSession checks if the given session exists.

func KillSession

func KillSession(name string) error

KillSessions kills a session.

func KillWindow

func KillWindow(windowID string) error

KillWindow kills a window by its ID.

func ListSessions

func ListSessions() ([]string, error)

ListSessions returns a list of all the running Tmux sessions

func ListWindows

func ListWindows() ([]string, error)

ListWindows returns a list of window IDs in the current session.

func Ls

func Ls() ([]string, error)

Ls returns a list of `tmux` running sessions.

func NewSession

func NewSession(name string) error

NewSession creates a new tmux session.

func NewSessionBuilder

func NewSessionBuilder(name string) *sessionBuilder

NewSessionBuilder creates a new session

func NewWindow

func NewWindow(name, command, directory string) error

NewWindow creates a new window with the given name, command, and directory.

func SelectWindow

func SelectWindow(name string) error

SelectWindow selects (focuses) a window by name.

func Switch

func Switch(name string) error

Switch ensures that you create/switch/attach to a new session by name.

The value of `name` is supposed to be a directory path.

func SwitchClient

func SwitchClient(name string) error

SwitchClient switches the client to the given session.

Types

This section is empty.

Jump to

Keyboard shortcuts

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