Documentation
¶
Index ¶
Constants ¶
View Source
const StatusMessageTimeout = time.Second * 3 // How long to show status messages.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Commander ¶
type Commander interface {
RunContext(ctx context.Context) command.Output
RunOnEvent()
String() string
Subscribe(ch chan<- command.Event)
GetProfiles() map[string]*profile.Profile
GetCurrentProfile() (string, *profile.Profile)
FindProfiles(path string) ([]command.ProfileMatch, error)
ConfigureContext(ctx context.Context, opts ...command.RunnerOpt) error
RunPluginContext(ctx context.Context, name string) command.Output
FS() (*command.FilteredFS, error)
}
type CommonModel ¶
type CommonModel struct {
Cmd Commander
Theme *theme.Theme
StatusMessageTimer *time.Timer
KeyBinds *KeyBinds
StatusMessage StatusMessage
Width int
Height int
Loaded bool
ShowStatusMessage bool // Whether to show the status message in the status bar.
}
func (*CommonModel) GetStatusBar ¶
func (m *CommonModel) GetStatusBar() *statusbar.StatusBarRenderer
func (*CommonModel) SendStatusMessage ¶
Show a status (success) message to the user.
type KeyBinds ¶
type KeyBinds struct {
Quit *keys.KeyBind `json:"quit,omitempty"`
Suspend *keys.KeyBind `json:"suspend,omitempty"`
Reload *keys.KeyBind `json:"reload,omitempty"`
Help *keys.KeyBind `json:"help,omitempty"`
Error *keys.KeyBind `json:"error,omitempty"`
Escape *keys.KeyBind `json:"escape,omitempty"`
Menu *keys.KeyBind `json:"menu,omitempty"`
// Navigation.
Up *keys.KeyBind `json:"up,omitempty"`
Down *keys.KeyBind `json:"down,omitempty"`
Left *keys.KeyBind `json:"left,omitempty"`
Right *keys.KeyBind `json:"right,omitempty"`
Prev *keys.KeyBind `json:"prev,omitempty"`
Next *keys.KeyBind `json:"next,omitempty"`
}
func (*KeyBinds) EnsureDefaults ¶
func (kb *KeyBinds) EnsureDefaults()
func (*KeyBinds) GetKeyBinds ¶
type StatusMessage ¶
type StatusMessageTimeoutMsg ¶
type StatusMessageTimeoutMsg struct{}
Click to show internal directories.
Click to hide internal directories.