Documentation ¶
Index ¶
- Variables
- type EventTitle
- type Option
- type Terminal
- func (t *Terminal) Close()
- func (t *Terminal) Draw()
- func (t *Terminal) GetCursor() (bool, int, int, tcell.CursorStyle)
- func (t *Terminal) HandleEvent(e tcell.Event) bool
- func (t *Terminal) Resize()
- func (t *Terminal) Run(cmd *exec.Cmd) error
- func (t *Terminal) RunWithAttrs(cmd *exec.Cmd, attr *syscall.SysProcAttr) error
- func (t *Terminal) SetView(view views.View)
- func (t *Terminal) Size() (int, int)
- type WinSize
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LINUX_KEY_MAP = map[tcell.Key]string{ tcell.KeyEnter: "\r", tcell.KeyBackspace: "\x7f", tcell.KeyBackspace2: "\x7f", tcell.KeyTab: "\t", tcell.KeyEscape: "\x1b", tcell.KeyDown: "\x1b[B", tcell.KeyUp: "\x1b[A", tcell.KeyRight: "\x1b[C", tcell.KeyLeft: "\x1b[D", tcell.KeyHome: "\x1b[1~", tcell.KeyEnd: "\x1b[4~", tcell.KeyPgUp: "\x1b[5~", tcell.KeyPgDn: "\x1b[6~", tcell.KeyDelete: "\x1b[3~", tcell.KeyInsert: "\x1b[2~", tcell.KeyF1: "\x1bOP", tcell.KeyF2: "\x1bOQ", tcell.KeyF3: "\x1bOR", tcell.KeyF4: "\x1bOS", tcell.KeyF5: "\x1b[15~", tcell.KeyF6: "\x1b[17~", tcell.KeyF7: "\x1b[18~", tcell.KeyF8: "\x1b[19~", tcell.KeyF9: "\x1b[20~", tcell.KeyF10: "\x1b[21~", tcell.KeyF12: "\x1b[24~", } LINUX_CTRL_KEY_MAP = map[tcell.Key]string{ tcell.KeyUp: "\x1b[1;5A", tcell.KeyDown: "\x1b[1;5B", tcell.KeyRight: "\x1b[1;5C", tcell.KeyLeft: "\x1b[1;5D", } LINUX_CTRL_RUNE_MAP = map[rune]string{ '@': "\x00", '`': "\x00", '[': "\x1b", '{': "\x1b", '\\': "\x1c", '|': "\x1c", ']': "\x1d", '}': "\x1d", '^': "\x1e", '~': "\x1e", '_': "\x1f", '?': "\x7f", } LINUX_ALT_KEY_MAP = map[tcell.Key]string{ tcell.KeyUp: "\x1b[1;3A", tcell.KeyDown: "\x1b[1;3B", tcell.KeyRight: "\x1b[1;3C", tcell.KeyLeft: "\x1b[1;3D", } )
Functions ¶
This section is empty.
Types ¶
type EventTitle ¶
type EventTitle struct {
// contains filtered or unexported fields
}
func (*EventTitle) Title ¶
func (ev *EventTitle) Title() string
func (*EventTitle) When ¶
func (ev *EventTitle) When() time.Time
func (*EventTitle) Widget ¶
func (ev *EventTitle) Widget() views.Widget
type Option ¶
type Option func(*Terminal)
func WithPollInterval ¶
WithPollInterval sets the minimum time, in ms, between views.EventWidgetContent events, which signal the screen has updates which can be drawn.
Default: 8 ms
func WithWindowManipulator ¶
func WithWindowManipulator(wm termutil.WindowManipulator) Option
type Terminal ¶
type Terminal struct { views.WidgetWatchers // contains filtered or unexported fields }
func (*Terminal) GetCursor ¶
GetCursor returns if the cursor is visible, it's x and y position, and it's style. If the cursor is not visible, the coordinates will be -1,-1
func (*Terminal) HandleEvent ¶
func (*Terminal) Resize ¶
func (t *Terminal) Resize()
Resize resizes the terminal to the dimensions of the terminals view
func (*Terminal) RunWithAttrs ¶
Click to show internal directories.
Click to hide internal directories.