Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultConfigFile = ".jig.yml"
Variables ¶
View Source
var ( ErrConfigNotFound = errors.New("project file not found") ErrEditorNotFound = errors.New("editor not found") ErrNoWindowsFound = errors.New("no windows found") ErrNoSessionName = errors.New("you must specify a session name") ErrNotInsideSession = errors.New("cannot use -i flag outside of a tmux session") )
Functions ¶
func FindConfig ¶
FindConfig finds the config filename in the specified directory.
func GetConfigPath ¶
GetConfigPath returns the default base config path.
func ListConfigs ¶
ListConfigs returns a list of config files in the specified directory.
Types ¶
type Config ¶
type Config struct { Session string `yaml:"session"` Env map[string]string `yaml:"env,omitempty"` Path string `yaml:"path"` Before []string `yaml:"before,omitempty"` After []string `yaml:"after,omitempty"` Windows []Window `yaml:"windows"` CommandDelay int `yaml:"command_delay,omitempty"` SuppressHistory bool `yaml:"suppress_history,omitempty"` Sessions []Config `yaml:"sessions,omitempty"` ConfigPath string `yaml:"config_path,omitempty"` }
func LoadConfig ¶
LoadConfig reads an entire config file, parses it with supplied variables, adds default environment variables and returns the final config.
func RenderConfig ¶
RenderConfig renders contents with supplied variables.
func (Config) GetSessionPath ¶ added in v0.1.1
type Jig ¶
type Jig struct { Tmux tmux.TmuxClient Theme Theme Options Options InSession bool }
func (Jig) GenerateSessionConfig ¶
GenerateSessionConfig creates a Config object from a tmux session.
func (Jig) Start ¶
Start starts a new tmux session, any nested sessions, run optional `before` command and optionally attach to the first session.
func (Jig) SwitchOrAttach ¶
SwitchOrAttach switches to a tmux session or attaches to it if it exists.
type Pane ¶
type Pane struct { Type string `yaml:"type,omitempty"` Path string `yaml:"path,omitempty"` Focus bool `yaml:"focus,omitempty"` Commands []string `yaml:"commands,omitempty"` Cmd string `yaml:"cmd,omitempty"` }
func (Pane) GetCommands ¶ added in v0.1.2
type Theme ¶
type Window ¶
type Window struct { Name string `yaml:"name"` Before []string `yaml:"before,omitempty"` Panes []Pane `yaml:"panes,omitempty"` Layout string `yaml:"layout"` Focus bool `yaml:"focus,omitempty"` Manual bool `yaml:"manual,omitempty"` Path string `yaml:"path,omitempty"` Commands []string `yaml:"commands,omitempty"` Cmd string `yaml:"cmd,omitempty"` }
func (Window) GetCommands ¶ added in v0.1.2
Click to show internal directories.
Click to hide internal directories.