ui

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultKeyMap = KeyMap{
	FirstTab: key.NewBinding(
		key.WithKeys("f1"),
		key.WithHelp("f1", "first tab"),
	),
	SecondTab: key.NewBinding(
		key.WithKeys("f2"),
		key.WithHelp("f2", "second tab"),
	),
	ThirdTab: key.NewBinding(
		key.WithKeys("f3"),
		key.WithHelp("f3", "third tab"),
	),
	FourthTab: key.NewBinding(
		key.WithKeys("f4"),
		key.WithHelp("f4", "fourth tab"),
	),
	FifthTab: key.NewBinding(
		key.WithKeys("f5"),
		key.WithHelp("f5", "fifth tab"),
	),
	SixthTab: key.NewBinding(
		key.WithKeys("f6"),
		key.WithHelp("f6", "sixth tab"),
	),
	SeventhTab: key.NewBinding(
		key.WithKeys("f7"),
		key.WithHelp("f7", "seventh tab"),
	),
	EightTab: key.NewBinding(
		key.WithKeys("f8"),
		key.WithHelp("f8", "eight tab"),
	),
	NinthTab: key.NewBinding(
		key.WithKeys("f9"),
		key.WithHelp("f9", "ninth tab"),
	),
	TenthTab: key.NewBinding(
		key.WithKeys("f10"),
		key.WithHelp("f10", "tenth tab"),
	),
	EleventhTab: key.NewBinding(
		key.WithKeys("f11"),
		key.WithHelp("f11", "eleventh tab"),
	),
	TwelfthTab: key.NewBinding(
		key.WithKeys("f12"),
		key.WithHelp("f12", "twelfth tab"),
	),
	ThirteenthTab: key.NewBinding(
		key.WithKeys("f13"),
		key.WithHelp("f13", "thirteenth tab"),
	),
	PrevTab: key.NewBinding(
		key.WithKeys("ctrl+p"),
		key.WithHelp("ctrl+p", "previous tab"),
	),
	NextTab: key.NewBinding(
		key.WithKeys("ctrl+n"),
		key.WithHelp("ctrl+n", "next tab"),
	),
	Up: key.NewBinding(
		key.WithKeys("k", "up"),
		key.WithHelp("↑/k", "move up"),
	),
	Down: key.NewBinding(
		key.WithKeys("j", "down"),
		key.WithHelp("↓/j", "move down"),
	),
	Quit: key.NewBinding(
		key.WithKeys("q", "ctrl+q"),
		key.WithHelp("q/Q", "quit"),
	),
}

Functions

This section is empty.

Types

type KeyMap

type KeyMap struct {
	FirstTab      key.Binding
	SecondTab     key.Binding
	ThirdTab      key.Binding
	FourthTab     key.Binding
	FifthTab      key.Binding
	SixthTab      key.Binding
	SeventhTab    key.Binding
	EightTab      key.Binding
	NinthTab      key.Binding
	TenthTab      key.Binding
	EleventhTab   key.Binding
	TwelfthTab    key.Binding
	ThirteenthTab key.Binding
	PrevTab       key.Binding
	NextTab       key.Binding
	Up            key.Binding
	Down          key.Binding
	Quit          key.Binding
}

type Model

type Model struct {
	// contains filtered or unexported fields
}

func NewModel

func NewModel(ctx *uictx.Ctx) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

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

func (Model) View

func (m Model) View() string

Directories

Path Synopsis
ci

Jump to

Keyboard shortcuts

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