swaytui

package
v0.0.0-...-b4fdbc6 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start()

Types

type MonitorWidget

type MonitorWidget struct {
	tui.WidgetBase
	// contains filtered or unexported fields
}

MonitorWidget for showing one or multiple monitors

func NewMonitorWidget

func NewMonitorWidget(opts *sway.OutputsWithSelected) *MonitorWidget

NewMonitorWidget creates new monitorWidget

func (*MonitorWidget) Draw

func (wid *MonitorWidget) Draw(p *tui.Painter)

Draw is for tui-go to draw stuff

func (*MonitorWidget) SetBorder

func (g *MonitorWidget) SetBorder(enabled bool)

func (*MonitorWidget) SizeHint

func (w *MonitorWidget) SizeHint() image.Point

type TextChangeButton

type TextChangeButton struct {
	tui.WidgetBase
	// contains filtered or unexported fields
}

Button is a widget that can be activated to perform some action, or to answer a question.

func NewTextChangeButton

func NewTextChangeButton(text string) *TextChangeButton

NewButton returns a new Button with the given text as the label.

func (*TextChangeButton) Draw

func (b *TextChangeButton) Draw(p *tui.Painter)

Draw draws the button.

func (*TextChangeButton) GetText

func (b *TextChangeButton) GetText() string

GetText gets the text of the button

func (*TextChangeButton) OnActivated

func (b *TextChangeButton) OnActivated(fn func(b *TextChangeButton))

OnActivated allows a custom function to be run whenever the button is activated.

func (*TextChangeButton) OnKeyEvent

func (b *TextChangeButton) OnKeyEvent(ev tui.KeyEvent)

OnKeyEvent handles keys events.

func (*TextChangeButton) SetText

func (b *TextChangeButton) SetText(text string)

SetText sets the text of the button

func (*TextChangeButton) SizeHint

func (b *TextChangeButton) SizeHint() image.Point

SizeHint returns the recommended size hint for the button.

Jump to

Keyboard shortcuts

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