widgets

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package widgets contains a YaGoStatus widgets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBlankWidget added in v0.4.0

func NewBlankWidget(params interface{}, wlogger logger.Logger) (ygs.Widget, error)

NewBlankWidget returns a new BlankWidget.

func NewClockWidget added in v0.4.0

func NewClockWidget(params interface{}, wlogger logger.Logger) (ygs.Widget, error)

NewClockWidget returns a new ClockWidget.

func NewExecWidget added in v0.4.0

func NewExecWidget(params interface{}, wlogger logger.Logger) (ygs.Widget, error)

NewExecWidget returns a new ExecWidget.

func NewHTTPWidget added in v0.4.0

func NewHTTPWidget(params interface{}, wlogger logger.Logger) (ygs.Widget, error)

NewHTTPWidget returns a new HTTPWidget.

func NewStaticWidget added in v0.4.0

func NewStaticWidget(params interface{}, wlogger logger.Logger) (ygs.Widget, error)

NewStaticWidget returns a new StaticWidget.

func NewWrapperWidget added in v0.4.0

func NewWrapperWidget(params interface{}, wlogger logger.Logger) (ygs.Widget, error)

NewWrapperWidget returns a new WrapperWidget.

Types

type BlankWidget added in v0.2.0

type BlankWidget struct{}

BlankWidget is a widgets template.

func (*BlankWidget) Continue added in v1.0.0

func (w *BlankWidget) Continue() error

Continue continues the widdget.

func (*BlankWidget) Event added in v0.2.0

func (w *BlankWidget) Event(event ygs.I3BarClickEvent, blocks []ygs.I3BarBlock) error

Event processes the widget events.

func (*BlankWidget) Run added in v0.2.0

func (w *BlankWidget) Run(c chan<- []ygs.I3BarBlock) error

Run starts the main loop.

func (*BlankWidget) Shutdown added in v1.0.0

func (w *BlankWidget) Shutdown() error

Shutdown shutdowns the widget.

func (*BlankWidget) Stop added in v0.2.0

func (w *BlankWidget) Stop() error

Stop stops the widdget.

type BlankWidgetParams added in v1.0.0

type BlankWidgetParams struct{}

BlankWidgetParams are widget parameters.

type ClockWidget

type ClockWidget struct {
	BlankWidget
	// contains filtered or unexported fields
}

ClockWidget implements a clock.

func (*ClockWidget) Run

func (w *ClockWidget) Run(c chan<- []ygs.I3BarBlock) error

Run starts the main loop.

type ClockWidgetParams added in v1.0.0

type ClockWidgetParams struct {
	Interval uint
	Format   string
}

ClockWidgetParams are widget parameters.

type ExecWidget

type ExecWidget struct {
	BlankWidget
	// contains filtered or unexported fields
}

ExecWidget implements the exec widget.

func (*ExecWidget) Event

func (w *ExecWidget) Event(event ygs.I3BarClickEvent, blocks []ygs.I3BarBlock) error

Event processes the widget events.

func (*ExecWidget) Run

func (w *ExecWidget) Run(c chan<- []ygs.I3BarBlock) error

Run starts the main loop.

type ExecWidgetParams added in v1.0.0

type ExecWidgetParams struct {
	Command      string
	Interval     int
	Retry        *int
	Silent       bool
	EventsUpdate bool `yaml:"events_update"`
	Signal       *int
	OutputFormat executor.OutputFormat `yaml:"output_format"`
	WorkDir      string
}

ExecWidgetParams are widget parameters.

type HTTPWidget added in v0.2.0

type HTTPWidget struct {
	BlankWidget
	// contains filtered or unexported fields
}

HTTPWidget implements the http server widget.

func (*HTTPWidget) Event added in v0.2.0

func (w *HTTPWidget) Event(event ygs.I3BarClickEvent, blocks []ygs.I3BarBlock) error

Event processes the widget events.

func (*HTTPWidget) Run added in v0.2.0

func (w *HTTPWidget) Run(c chan<- []ygs.I3BarBlock) error

Run starts the main loop.

func (*HTTPWidget) Shutdown added in v1.0.0

func (w *HTTPWidget) Shutdown() error

type HTTPWidgetParams added in v1.0.0

type HTTPWidgetParams struct {
	Network string
	Listen  string
	Path    string
}

HTTPWidgetParams are widget parameters.

type StaticWidget

type StaticWidget struct {
	BlankWidget
	// contains filtered or unexported fields
}

StaticWidget implements a static widget.

func (*StaticWidget) Run

func (w *StaticWidget) Run(c chan<- []ygs.I3BarBlock) error

Run returns configured blocks.

type StaticWidgetParams added in v1.0.0

type StaticWidgetParams struct {
	Blocks string
}

StaticWidgetParams are widget parameters.

type WrapperWidget

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

WrapperWidget implements the wrapper of other status commands.

func (*WrapperWidget) Continue added in v1.0.0

func (w *WrapperWidget) Continue() error

Continue continues the widdget.

func (*WrapperWidget) Event

func (w *WrapperWidget) Event(event ygs.I3BarClickEvent, blocks []ygs.I3BarBlock) error

Event processes the widget events.

func (*WrapperWidget) Run

func (w *WrapperWidget) Run(c chan<- []ygs.I3BarBlock) error

Run starts the main loop.

func (*WrapperWidget) Shutdown added in v1.0.0

func (w *WrapperWidget) Shutdown() error

Shutdown shutdowns the widget.

func (*WrapperWidget) Stop

func (w *WrapperWidget) Stop() error

Stop stops the widdget.

type WrapperWidgetParams added in v1.0.0

type WrapperWidgetParams struct {
	Command string
	WorkDir string
}

WrapperWidgetParams are widget parameters.

Jump to

Keyboard shortcuts

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