core

package
v0.0.0-...-e38c21c Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearCache

func ClearCache()

Clear cached directories

func Del

func Del(l *tview.List)

Delete's a selected file or directory, copies it to buffer

func GetDirs

func GetDirs() (string, string, error)

Returns current directory and parent directory

func NewList

func NewList(text string) *tview.List

Generate list from given directory

func Put

func Put(l *tview.List)

Paste a file

func Yank

func Yank(l *tview.List)

Sets buffer to selected file path

Types

type Cowboy

type Cowboy struct {
	Tview    *tview.Application
	Grid     *tview.Grid
	Current  *tview.List
	Parent   *tview.List
	OpenFile *tview.TextView
}

Current contains the current working directory, Parent contains its parent

var (
	App *Cowboy
)

Global container

func (*Cowboy) Init

func (c *Cowboy) Init() error

Initialize App's layout and content

func (*Cowboy) ParentTraverseDirDown

func (c *Cowboy) ParentTraverseDirDown()

Allows parent directory to change child directory

func (*Cowboy) SetHandlers

func (c *Cowboy) SetHandlers()

Setup controls

func (*Cowboy) TraverseDirDown

func (c *Cowboy) TraverseDirDown()

Navigate into selected directory

func (*Cowboy) TraverseDirUp

func (c *Cowboy) TraverseDirUp()

Navigate to parent directory

Jump to

Keyboard shortcuts

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