statusbar

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package statusbar provides an statusbar bubble which can render four different status sections

Index

Constants

View Source
const Height = 1

Height represents the height of the statusbar.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorConfig added in v0.0.6

type ColorConfig struct {
	Foreground lipgloss.AdaptiveColor
	Background lipgloss.AdaptiveColor
}

ColorConfig

type Model added in v0.3.1

type Model struct {
	Width              int
	Height             int
	FirstColumn        string
	SecondColumn       string
	ThirdColumn        string
	FourthColumn       string
	FirstColumnColors  ColorConfig
	SecondColumnColors ColorConfig
	ThirdColumnColors  ColorConfig
	FourthColumnColors ColorConfig
}

Model represents the properties of the statusbar.

func New added in v0.0.6

func New(firstColumnColors, secondColumnColors, thirdColumnColors, fourthColumnColors ColorConfig) Model

New creates a new instance of the statusbar.

func (*Model) SetColors added in v0.3.1

func (m *Model) SetColors(firstColumnColors, secondColumnColors, thirdColumnColors, fourthColumnColors ColorConfig)

SetColors sets the colors of the 4 columns.

func (*Model) SetContent added in v0.3.1

func (m *Model) SetContent(firstColumn, secondColumn, thirdColumn, fourthColumn string)

SetContent sets the content of the statusbar.

func (*Model) SetSize added in v0.3.1

func (m *Model) SetSize(width int)

SetSize sets the width of the statusbar.

func (Model) Update added in v0.3.1

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

Update updates the size of the statusbar.

func (Model) View added in v0.3.1

func (m Model) View() string

View returns a string representation of a statusbar.

Jump to

Keyboard shortcuts

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