clock

package
v0.0.0-...-548ec3f Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClockWidget

type ClockWidget struct {
	Layout *tview.Grid
	// contains filtered or unexported fields
}

func NewClockWidget

func NewClockWidget(app *tview.Application) ClockWidget

returns a newly created ClockWidget.

func (*ClockWidget) Run

func (c *ClockWidget) Run()

Runs update() if no error happens, starts a goroutine. First goroutine create a channel, start loopCurrentTime as a goroutine. Listen to the channel for a new value.

func (*ClockWidget) UpdateBorderColor

func (c *ClockWidget) UpdateBorderColor()

Updates border color depending if widget has focus or not.

Jump to

Keyboard shortcuts

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