Documentation ¶
Index ¶
- Variables
- type Bookmark
- type BookmarkConfig
- type BookmarkStore
- type Bookmarks
- func (b *Bookmarks) Add(name string) error
- func (b *Bookmarks) AddBookmark(gui *Gui)
- func (b *Bookmarks) BookmarkKeybinding(gui *Gui)
- func (b *Bookmarks) CloseBookmark(gui *Gui)
- func (b *Bookmarks) Delete(id int) error
- func (b *Bookmarks) GetSearchWord() string
- func (b *Bookmarks) GetSelectEntry() *Bookmark
- func (e *Bookmarks) SearchBookmark(gui *Gui)
- func (b *Bookmarks) SetSearchWord(word string)
- func (b *Bookmarks) Update() error
- func (b *Bookmarks) UpdateView() error
- type Config
- type DBLogger
- type File
- type FileBrowser
- type FileTable
- func (e *FileTable) ChangeDir(gui *Gui, current, target string) error
- func (e *FileTable) Entries() []*File
- func (e *FileTable) GetSearchWord() string
- func (e *FileTable) GetSelectEntry() *File
- func (e *FileTable) Keybinding(gui *Gui)
- func (e *FileTable) RefreshView()
- func (e *FileTable) RestorePos(path string)
- func (e *FileTable) SearchFiles(gui *Gui)
- func (e *FileTable) SetColumns()
- func (e *FileTable) SetEntries(path string) []*File
- func (e *FileTable) SetHeader()
- func (e *FileTable) SetSearchWord(word string)
- func (e *FileTable) SetSelectPos(path string)
- func (e *FileTable) SetViewable(viewable bool)
- func (e *FileTable) UpdateColor()
- func (e *FileTable) UpdateView()
- type Gui
- func (gui *Gui) Confirm(message, doneLabel string, panel Panel, doneFunc func() error)
- func (gui *Gui) EditFile(file string) error
- func (gui *Gui) ExecCmd(attachStd bool, cmd string, args ...string) error
- func (gui *Gui) FocusPanel(panel Panel)
- func (gui *Gui) Form(fieldLabel map[string]string, doneLabel, title, pageName string, panel Panel, ...)
- func (gui *Gui) InputPathKeybinding()
- func (gui *Gui) Message(message string, panel Panel)
- func (gui *Gui) Modal(p tview.Primitive, width, height int) tview.Primitive
- func (gui *Gui) Run() error
- func (gui *Gui) SetKeybindings()
- func (gui *Gui) Stop()
- type Help
- type History
- type HistoryManager
- type LogConfig
- type Panel
- type Preview
- type PreviewConfig
- type Register
- type Tree
- func (t *Tree) AddNode(parent *tview.TreeNode, files []*File)
- func (t *Tree) ChangeDir(gui *Gui, current string, target string) error
- func (t *Tree) GetCurrentlyNode(oldpath string, target *tview.TreeNode) *tview.TreeNode
- func (t *Tree) GetSearchWord() string
- func (t *Tree) GetSelectEntry() *File
- func (t *Tree) Keybinding(gui *Gui)
- func (t *Tree) RestorePos(path string)
- func (t *Tree) SearchFiles(gui *Gui)
- func (t *Tree) SetEntries(path string) []*File
- func (t *Tree) SetSearchWord(word string)
- func (t *Tree) SetSelectPos(path string)
- func (t *Tree) UpdateView()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrGetCwd = errors.New("can't get current dir") ErrEdit = errors.New("can't edit") ErrReadFile = errors.New("can't read file") ErrReadDir = errors.New("can't read dir") ErrTokenise = errors.New("can't tokenise") ErrGetTime = errors.New("can't get timespec") ErrNoPathName = errors.New("no path name") ErrNotExistPath = errors.New("not exist path") ErrNoEditor = errors.New("$EDITOR is empty") )
Functions ¶
This section is empty.
Types ¶
type BookmarkConfig ¶
type BookmarkStore ¶
type BookmarkStore struct {
// contains filtered or unexported fields
}
func NewBookmarkStore ¶
func NewBookmarkStore(file string) (*BookmarkStore, error)
func (*BookmarkStore) Delete ¶
func (b *BookmarkStore) Delete(id int) error
func (*BookmarkStore) HasBookmark ¶
func (b *BookmarkStore) HasBookmark(name string) bool
func (*BookmarkStore) Load ¶
func (b *BookmarkStore) Load() ([]Bookmark, error)
func (*BookmarkStore) Save ¶
func (b *BookmarkStore) Save(bookmark Bookmark) error
type Bookmarks ¶
func NewBookmark ¶
func (*Bookmarks) AddBookmark ¶
func (*Bookmarks) BookmarkKeybinding ¶
func (*Bookmarks) CloseBookmark ¶
func (*Bookmarks) GetSearchWord ¶
func (*Bookmarks) GetSelectEntry ¶
func (*Bookmarks) SearchBookmark ¶
func (*Bookmarks) SetSearchWord ¶
func (*Bookmarks) UpdateView ¶
type Config ¶
type Config struct { ConfigDir string ConfigFile string Log LogConfig `yaml:"log"` Preview PreviewConfig `yaml:"preview"` Bookmark BookmarkConfig `yaml:"bookmark"` IgnoreCase bool `yaml:"ignore_case"` OpenCmd string `yaml:"open_cmd"` EnableTree bool `yaml:"enable_tree"` ShowHidden bool `yaml:"show_hidden"` }
func DefaultConfig ¶
func DefaultConfig() Config
type File ¶
type File struct { Name string // file name Path string // file path PathName string // file's path and name Access string Create string Change string Size int64 Permission string Owner string Group string Viewable bool IsDir bool }
File file or dir info
type FileBrowser ¶
type FileTable ¶
FileTable file list
func NewFileTable ¶
NewFileTable new entry list
func (*FileTable) GetSearchWord ¶
func (*FileTable) GetSelectEntry ¶
GetSelectEntry get selected entry
func (*FileTable) Keybinding ¶
func (*FileTable) RefreshView ¶
func (e *FileTable) RefreshView()
func (*FileTable) RestorePos ¶
RestorePos restore select position
func (*FileTable) SearchFiles ¶
func (*FileTable) SetEntries ¶
SetEntries set entries
func (*FileTable) SetSearchWord ¶
func (*FileTable) SetSelectPos ¶
SetSelectPos save select position
func (*FileTable) SetViewable ¶
func (*FileTable) UpdateColor ¶
func (e *FileTable) UpdateColor()
func (*FileTable) UpdateView ¶
func (e *FileTable) UpdateView()
type Gui ¶
type Gui struct { CurrentPanel Panel Config Config InputPath *tview.InputField Register *Register HistoryManager *HistoryManager FileBrowser FileBrowser Preview *Preview Bookmark *Bookmarks Help *Help App *tview.Application Pages *tview.Pages // contains filtered or unexported fields }
Gui gui have some manager
func (*Gui) FocusPanel ¶
func (*Gui) InputPathKeybinding ¶
func (gui *Gui) InputPathKeybinding()
func (*Gui) SetKeybindings ¶
func (gui *Gui) SetKeybindings()
type HistoryManager ¶
type HistoryManager struct {
// contains filtered or unexported fields
}
HistoryManager have the move history TODO limit max history
func NewHistoryManager ¶
func NewHistoryManager() *HistoryManager
NewHistoryManager new history manager
func (*HistoryManager) Previous ¶
func (h *HistoryManager) Previous() *History
Previous return the previous history
func (*HistoryManager) Save ¶
func (h *HistoryManager) Save(rowIdx int, path string)
Save save the move history
type Preview ¶
func NewPreview ¶
func (*Preview) ScrollDown ¶
func (p *Preview) ScrollDown()
func (*Preview) UpdateView ¶
type PreviewConfig ¶
type Register ¶
Register copy/paste file resource
func (*Register) ClearCopyResources ¶
func (r *Register) ClearCopyResources()
ClearCopyResources clear resouces
func (*Register) ClearMoveResources ¶
func (r *Register) ClearMoveResources()
ClearMoveResources clear resources
type Tree ¶
func (*Tree) GetCurrentlyNode ¶
func (*Tree) GetSearchWord ¶
func (*Tree) GetSelectEntry ¶
func (*Tree) Keybinding ¶
func (*Tree) RestorePos ¶
func (*Tree) SearchFiles ¶
func (*Tree) SetEntries ¶
func (*Tree) SetSearchWord ¶
func (*Tree) SetSelectPos ¶
func (*Tree) UpdateView ¶
func (t *Tree) UpdateView()
Click to show internal directories.
Click to hide internal directories.