Documentation ¶
Overview ¶
Package scaffold lets you declare a preset window with tabs, pains, env vars, and other configurations to get your multi-terminal program up fast.
This Package is EXPERIMENTAL and its APIs are likely to change before becoming stable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(appName string, w WindowSpec) error
Run takes a window spec and creates a new iTerm2 session and uses it to create a new window with the given specs.
Types ¶
type Env ¶
type Env []string
Env is a slice of environment variables to be exported in an iTerm2 session
type EnvGetter ¶
type EnvGetter interface {
GetEnv() []string
}
EnvGetter defines an interface that can be used to retrieve environment variables to be set on an iTerm2 session. The reason for this interface is that so you can specify dynamic tabs such as tabs being read from a file instead of having to statically create them. If you want to statically pass a set of env vars to a TabSpec, just use scaffold.Env which is a slice of strings that implements this interface
type TabSpec ¶
type TabSpec struct { Title string Dir string Env EnvGetter OnCreate func(s iterm2.Session) error Pane *PaneSpec }
TabSpec specifies a main tab in your iTerm2 window
type WindowSpec ¶
WindowSpec specifies a window configuration.