Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitForStatusMessageTimeout ¶
func WaitForStatusMessageTimeout(appCtx ApplicationContext, t *time.Timer) tea.Cmd
Types ¶
type ApplicationContext ¶
type ApplicationContext int
ApplicationContext indicates the area of the application something applies to. Occasionally used as an argument to commands and messages.
const ( ListContext ApplicationContext = iota PagerContext StatusMessageTimeout = time.Second * 3 // How long to show status messages. )
type CommonModel ¶
type CommonModel struct {
Cmd Commander
Theme *themes.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 `yaml:"quit"`
Suspend *keys.KeyBind `yaml:"suspend"`
Reload *keys.KeyBind `yaml:"reload"`
Help *keys.KeyBind `yaml:"help"`
Error *keys.KeyBind `yaml:"error"`
Escape *keys.KeyBind `yaml:"escape"`
// Navigation.
Up *keys.KeyBind `yaml:"up"`
Down *keys.KeyBind `yaml:"down"`
Left *keys.KeyBind `yaml:"left"`
Right *keys.KeyBind `yaml:"right"`
Prev *keys.KeyBind `yaml:"prev"`
Next *keys.KeyBind `yaml:"next"`
}
func (*KeyBinds) EnsureDefaults ¶
func (kb *KeyBinds) EnsureDefaults()
func (*KeyBinds) GetKeyBinds ¶
type StatusMessage ¶
type StatusMessageTimeoutMsg ¶
type StatusMessageTimeoutMsg ApplicationContext
Click to show internal directories.
Click to hide internal directories.