Documentation
¶
Index ¶
- Variables
- type ClientsItem
- type DefaultItemStyles
- type KeyMap
- type Model
- func (m Model) Help() [][]key.Binding
- func (m Model) Index() int
- func (m Model) Init() tea.Cmd
- func (m Model) SelectedItem() list.Item
- func (m *Model) SetSize(width, height int)
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View() string
- func (m Model) VisibleItems() []list.Item
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultKeyMap = KeyMap{ CursorUp: key.NewBinding(key.WithKeys("up", "k"), key.WithHelp("↑/k", "up")), CursorDown: key.NewBinding(key.WithKeys("down", "j"), key.WithHelp("↓/j", "down")), Quit: key.NewBinding(key.WithKeys("q", "esc"), key.WithHelp("q/esc", "quit")), Help: key.NewBinding(key.WithKeys("?"), key.WithHelp("?", "close help")), Select: key.NewBinding(key.WithKeys("enter"), key.WithHelp("enter", "select client")), Reload: key.NewBinding(key.WithKeys("r"), key.WithHelp("r", "reload list")), }
Functions ¶
This section is empty.
Types ¶
type ClientsItem ¶
type ClientsItem interface { fmt.Stringer // just to fulfill the list.Item interface FilterValue() string // Return the title of the client Title() string // Whether the client is available Available() bool // Some stats about the client. Will be displayed next to each other separated by a dot Stats() []string }
type DefaultItemStyles ¶
type KeyMap ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func (Model) SelectedItem ¶
func (Model) VisibleItems ¶
Click to show internal directories.
Click to hide internal directories.