tmux

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2019 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrProjectNotFoundForGivenSessionName is returned by SwitchClient if the
	// selected session (via fzf currently) was not found. This usually means
	// that fzf output was not one of the input.
	ErrProjectNotFoundForGivenSessionName = errors.New("project not found for the given session name")

	// ErrVimSessionFound is returned by KillServer(closeVim bool) if a vim was
	// found running on the server and closeVim is false
	ErrVimSessionFound = errors.New("vim was found, cannot exit server to avoid data loss")
)

Functions

This section is empty.

Types

type Manager

type Manager interface {
	// SwitchClient switches the TMUX to a different client
	// KiilPane when set, will close the TMUX pane running swm
	SwitchClient(killPane bool) error

	// VimExit will close any running vim for this session, saving any changed
	// file.
	VimExit() error

	// KillServer kills the TMUX server. If closeVim is false, and Vim sessions
	// were found running, ErrVimSessionFound is returned.
	KillServer(closeVim bool) error
}

Manager represents a TMUX manager

func New

func New(opts *Options) Manager

New returns a new tmux manager

type Options

type Options struct {
	// Coder represents the coder instance
	Coder code.Coder

	// Profile represents the profile we are going to use to compute the list of
	// available projects as well as the ACTIVE_PROFILE of new sessions.
	Profile string

	// Story represents the story we are going to use to compute the list of
	// available projects.
	Story string
}

Options configures the tmux manager

Jump to

Keyboard shortcuts

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