Documentation
¶
Index ¶
- type Model
- func (m Model) KeyMap() table.KeyMap
- func (m Model) Selected() (file.Info, bool)
- func (m Model) SetDark(dark bool) Model
- func (m Model) SetErr(err error) Model
- func (m Model) SetFiles(path string, files []file.Info) Model
- func (m Model) SetFocused(focused bool) Model
- func (m Model) SetSize(w, h int) Model
- func (m Model) SetSpinner(frame string) Model
- func (m Model) Start() Model
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the files pane. It holds no client and performs no I/O; listings are set by the caller as they arrive.
func (Model) SetDark ¶
SetDark adapts the column headers and the selection to a dark or light terminal background.
func (Model) SetErr ¶
SetErr shows err below the listing, which is kept so the user can still navigate away from a directory that can't be read.
func (Model) SetFiles ¶
SetFiles replaces the listing with the contents of directory path and clears any error.
func (Model) SetFocused ¶ added in v1.1.0
SetFocused shows the border in the accent color if the list has the focus, and in gray if the preview next to it has.
func (Model) SetSpinner ¶ added in v1.1.0
SetSpinner shows frame in front of the title, for a listing that is loading; an empty frame hides it.