ui

package
v0.0.0-...-f53eb57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Console

type Console struct {
	Output     []string
	Input      []rune
	Cursor     int
	Dir        string
	History    []string
	HistoryPos int
	Scroll     int
	Active     bool
	Width      int
	Height     int
	// contains filtered or unexported fields
}

func NewConsole

func NewConsole(width, height int) *Console

func (*Console) AddOutput

func (c *Console) AddOutput(line string)

func (*Console) ClearInput

func (c *Console) ClearInput()

func (*Console) DeleteRune

func (c *Console) DeleteRune()

func (*Console) Exec

func (c *Console) Exec(cmdLine string)

func (*Console) InsertRune

func (c *Console) InsertRune(r rune)

func (*Console) NextHistory

func (c *Console) NextHistory()

func (*Console) PrevHistory

func (c *Console) PrevHistory()

func (*Console) RenderBody

func (c *Console) RenderBody(cursorOn bool) string

func (*Console) RenderHeader

func (c *Console) RenderHeader() string

type Mode

type Mode int
const (
	ModeBrowse Mode = iota
	ModeView
	ModeQuit
	ModeConfirm
	ModeRename
	ModeFilter
	ModeChmod
	ModeFileSearch
	ModeGrep
	ModePathHistory
	ModeCompare
)

type Model

type Model struct {
	Left    *Pane
	Right   *Pane
	Console *Console
	Focus   int
	Width   int
	Height  int
	// contains filtered or unexported fields
}

func NewModel

func NewModel(leftDir, rightDir string, editor string) *Model

func (*Model) FocusedPane

func (m *Model) FocusedPane() *Pane

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) OppPane

func (m *Model) OppPane() *Pane

func (*Model) Update

func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Model) View

func (m *Model) View() string

type Pane

type Pane struct {
	Dir         string
	Listing     *fs.Listing
	Cursor      int
	Offset      int
	Active      bool
	Width       int
	Height      int
	Marked      map[string]bool
	SortBy      fs.SortMode
	ShowDot     bool
	IsArchive   bool
	ArchivePath string
	ArchiveRoot string
	RealDir     string
	SavedCursor int
	Filter      string
	PathHistory []string
}

func NewPane

func NewPane(dir string, width, height int) *Pane

func (*Pane) Chdir

func (p *Pane) Chdir(dir string) error

func (*Pane) ClearMarks

func (p *Pane) ClearMarks()

func (*Pane) Current

func (p *Pane) Current() *fs.Entry

func (*Pane) Down

func (p *Pane) Down(n int)

func (*Pane) End

func (p *Pane) End()

func (*Pane) Home

func (p *Pane) Home()

func (*Pane) MarkAll

func (p *Pane) MarkAll()

func (*Pane) MarkedEntries

func (p *Pane) MarkedEntries() []fs.Entry

func (*Pane) PageDown

func (p *Pane) PageDown()

func (*Pane) PageUp

func (p *Pane) PageUp()

func (*Pane) Reload

func (p *Pane) Reload()

func (*Pane) RenderHeader

func (p *Pane) RenderHeader() string

func (*Pane) RenderRows

func (p *Pane) RenderRows() []RowInfo

func (*Pane) SelectedEntries

func (p *Pane) SelectedEntries() []fs.Entry

func (*Pane) ToggleMark

func (p *Pane) ToggleMark()

func (*Pane) Up

func (p *Pane) Up(n int)

type RowInfo

type RowInfo struct {
	Text      string
	IsDir     bool
	IsLink    bool
	IsMarked  bool
	IsCursor  bool
	IsArchive bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL