Documentation
¶
Overview ¶
Package sidebar is the file-browser sidebar TUI component.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ActiveBorderStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(lipgloss.Color("62")) InactiveBorderStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(lipgloss.Color("240")) SelectedItemStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color("62")). Bold(true) RootNodeStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color("252")). Bold(true) DirNodeStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color("252")) NormalItemStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color("252")) )
Sidebar lipgloss styles, updated by ApplyTheme.
Functions ¶
func ApplyTheme ¶
ApplyTheme updates sidebar style vars from theme colors.
Types ¶
type Model ¶
Model is the sidebar component.
func (*Model) FocusPath ¶ added in v0.9.0
FocusPath expands all ancestor dirs of path, rebuilds, and moves cursor to path.
func (*Model) Refresh ¶ added in v0.9.0
func (s *Model) Refresh()
Refresh re-reads directories from disk and rebuilds the visible list.
func (Model) SelectedPath ¶
SelectedPath returns the file path of the highlighted entry, or "" if it's a dir.
func (*Model) UpdateRoots ¶ added in v1.2.0
UpdateRoots rebuilds the roots slice and sort defaults from cfg, preserving the existing expanded state. Called after AddAssetDir or a vault switch.
Click to show internal directories.
Click to hide internal directories.