statusbar

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Keys = KeyMap{
	Quit: key.NewBinding(
		key.WithKeys("ctrl+c"),
		key.WithHelp("ctrl+c", "quit"),
	),
	KillProcess: key.NewBinding(
		key.WithKeys("ctrl+x"),
		key.WithHelp("ctrl+x", "kill process"),
	),
	Move: key.NewBinding(
		key.WithKeys("↑←↓→"),
		key.WithHelp("↑←↓→", "navigate"),
	),
	Filter: key.NewBinding(
		key.WithKeys("/"),
		key.WithHelp("/", "filter"),
	),
}

Functions

This section is empty.

Types

type Bubble

type Bubble struct {
	Styles Styles

	StatusMessageLifetime time.Duration
	// contains filtered or unexported fields
}

func New

func New(stardogClient stardog.Client, endpoint string) Bubble

func (Bubble) Init

func (b Bubble) Init() tea.Cmd

func (*Bubble) NewStatusMessage

func (b *Bubble) NewStatusMessage(s string, success bool) tea.Cmd

func (*Bubble) SetWidth

func (b *Bubble) SetWidth(width int)

func (Bubble) Update

func (b Bubble) Update(msg tea.Msg) (Bubble, tea.Cmd)

func (Bubble) View

func (b Bubble) View() string

type KeyMap

type KeyMap struct {
	Quit        key.Binding
	KillProcess key.Binding
	Move        key.Binding
	Filter      key.Binding
}

type Styles

type Styles struct {
	StatusBarStyle      lipgloss.Style
	EndpointStyle       lipgloss.Style
	HelpKeyStyle        lipgloss.Style
	HelpTextStyle       lipgloss.Style
	ErrorMessageStyle   lipgloss.Style
	SuccessMessageStyle lipgloss.Style
}

func DefaultStyles

func DefaultStyles() (s Styles)

Jump to

Keyboard shortcuts

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