Documentation
¶
Index ¶
- type KeyMap
- type Model
- func (m Model) Backend() backend.Backend
- func (m *Model) ClearSelection()
- func (m Model) CursorEntry() (backend.FileEntry, bool)
- func (m Model) CursorInfo() string
- func (m Model) Init() tea.Cmd
- func (m Model) IsCapturingInput() bool
- func (m Model) LastError() error
- func (m Model) Path() string
- func (m Model) PreviewContent() string
- func (m Model) PreviewName() string
- func (m Model) PreviewScroll() int
- func (m Model) Previewing() bool
- func (m Model) Refresh() tea.Cmd
- func (m Model) SelectedEntries() []backend.FileEntry
- func (m *Model) SetShowHidden(v bool)
- func (m *Model) SetSize(w, h int)
- func (m *Model) SetSortAsc(asc bool)
- func (m *Model) SetSortBy(s string)
- func (m *Model) SetTheme(t theme.Theme)
- func (m Model) StatusLine() string
- func (m Model) Title() string
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View() string
- func (m Model) ViewPreview(w, h int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyMap ¶
type KeyMap struct {
Up key.Binding
Down key.Binding
Enter key.Binding
Back key.Binding
Open key.Binding
Close key.Binding
Preview key.Binding
Quit key.Binding
}
KeyMap defines the key bindings for the browser.
type Model ¶
type Model struct {
Focused bool
Label string // e.g. "S3" or "Local"
ID int // panel identifier (0=left, 1=right)
// contains filtered or unexported fields
}
Model is the browser panel model.
func (*Model) ClearSelection ¶
func (m *Model) ClearSelection()
ClearSelection clears all selected entries.
func (Model) CursorEntry ¶
CursorEntry returns the entry under the cursor, if any.
func (Model) CursorInfo ¶
CursorInfo returns cursor position info like "3 of 42".
func (Model) IsCapturingInput ¶
IsCapturingInput reports whether the panel is in a text-input mode (searching or renaming) and should receive all keystrokes exclusively.
func (Model) PreviewContent ¶
PreviewContent returns the raw content of the previewed file.
func (Model) PreviewName ¶
PreviewName returns the name of the file being previewed.
func (Model) PreviewScroll ¶
PreviewScroll returns the current scroll offset in the preview.
func (Model) Previewing ¶
View renders the browser panel. Previewing returns true when the preview overlay is active.
func (Model) SelectedEntries ¶
SelectedEntries returns the list of selected file entries.
func (*Model) SetShowHidden ¶
SetShowHidden controls whether dotfiles are shown.
func (Model) StatusLine ¶
StatusLine renders the sort/filter status shown below the panel border.
func (Model) ViewPreview ¶
ViewPreview renders the preview overlay at the given width and height.