browser

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultKeymap = Keymap{
	CloseTab: key.NewBinding(
		key.WithKeys("c", "ctrl+w"),
		key.WithHelp("c", "Close tab"),
	),
	CycleTabs: key.NewBinding(
		key.WithKeys("tab"),
		key.WithHelp("Tab", "Cycle tabs"),
	),
	ShowHelp: key.NewBinding(
		key.WithKeys("h", "ctrl+h"),
		key.WithHelp("h", "Help"),
	),
	ToggleOfflineMode: key.NewBinding(
		key.WithKeys("o", "ctrl+o"),
		key.WithHelp("o", "Offline mode"),
	),
}

DefaultKeymap contains the default key bindings for the browser

Functions

This section is empty.

Types

type Keymap added in v1.2.0

type Keymap struct {
	CloseTab          key.Binding
	CycleTabs         key.Binding
	ShowHelp          key.Binding
	ToggleOfflineMode key.Binding
}

Keymap contains the key bindings for the browser

func (Keymap) FullHelp added in v1.2.0

func (k Keymap) FullHelp() [][]key.Binding

FullHelp returns the full help for this tab

func (Keymap) SetEnabled added in v1.3.0

func (k Keymap) SetEnabled(enabled bool) Keymap

SetEnabled allows to disable/enable shortcuts

func (Keymap) ShortHelp added in v1.2.0

func (k Keymap) ShortHelp() []key.Binding

ShortHelp returns the short help for this tab

type Model

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

Model is used to store the state of the application

func New

func New(colors *theme.Colors, backend *backend.Backend) Model

New returns a new model with some sensible defaults

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the model

func (Model) Update

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

Update handles the terminal size, modifying rss items and modifying tabs

func (Model) View

func (m Model) View() string

View renders the tab bar, the active tab and the status bar

Jump to

Keyboard shortcuts

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