tmux

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EditProject

func EditProject(name string) error

func ListActiveProjects

func ListActiveProjects() ([]string, error)

func ListProjects

func ListProjects() ([]string, error)

ProjectList gets a list of

func NewProject

func NewProject(name string) error

func StartProject

func StartProject(name string)

func StopProject

func StopProject(name string)

Types

type Project

type Project struct {
	Name           string   `yaml:"name"`
	Root           string   `yaml:"root"`
	OnProjectStart []string `yaml:"on_project_start,omitempty"`
	OnProjectStop  []string `yaml:"on_project_stop,omitempty"`
	Windows        []Window `yaml:"windows"`
}

func LoadProject

func LoadProject(name string) (*Project, error)

LoadProject loads and parses the config for the given project.

func (*Project) GetRoot

func (p *Project) GetRoot() string

func (*Project) RunCommands

func (p *Project) RunCommands(commands []string)

func (*Project) Save

func (p *Project) Save() error

type Tmux

type Tmux struct {
	BinPath string
	Debug   bool
}

func CreateTmux

func CreateTmux(debug bool) *Tmux

func (*Tmux) Attach

func (t *Tmux) Attach(name string) error

func (*Tmux) Exec

func (t *Tmux) Exec(args ...string) ([]byte, error)

func (*Tmux) KillSession

func (t *Tmux) KillSession(name string) error

func (*Tmux) ListSessions

func (t *Tmux) ListSessions() ([]string, error)

func (*Tmux) Run

func (t *Tmux) Run(args ...string)

type Window

type Window struct {
	Name     string   `yaml:"name"`
	Root     string   `yaml:"root,omitempty"`
	Commands []string `yaml:"commands,omitempty"`
	ID       string   `yaml:"-"`
}

func (*Window) Create

func (w *Window) Create(tmux *Tmux)

func (*Window) Focus

func (w *Window) Focus(tmux *Tmux)

func (*Window) SendCommands

func (w *Window) SendCommands(tmux *Tmux)

Jump to

Keyboard shortcuts

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