clocks

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: MPL-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock struct {
	Label    string
	Location *time.Location
}

func BuildClock added in v0.33.0

func BuildClock(label string, location string) (clock Clock, err error)

func NewClock

func NewClock(label string, timeLoc *time.Location) Clock

func (*Clock) Date

func (clock *Clock) Date(dateFormat string) string

func (*Clock) LocalTime

func (clock *Clock) LocalTime() time.Time

func (*Clock) Time

func (clock *Clock) Time(timeFormat string) string

func (*Clock) ToLocal

func (clock *Clock) ToLocal(t time.Time) time.Time

type ClockCollection

type ClockCollection struct {
	Clocks []Clock
}

func (*ClockCollection) Sorted

func (clocks *ClockCollection) Sorted(sortOrder string) []Clock

func (*ClockCollection) SortedAlphabetically

func (clocks *ClockCollection) SortedAlphabetically()

func (*ClockCollection) SortedChronologically

func (clocks *ClockCollection) SortedChronologically()

type Settings

type Settings struct {
	*cfg.Common
	// contains filtered or unexported fields
}

Settings defines the configuration properties for this module

func NewSettingsFromYAML

func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings

NewSettingsFromYAML creates a new settings instance from a YAML config block

type Widget

type Widget struct {
	view.TextWidget
	// contains filtered or unexported fields
}

func NewWidget

func NewWidget(tviewApp *tview.Application, redrawChan chan bool, settings *Settings) *Widget

func (*Widget) Refresh

func (widget *Widget) Refresh()

Refresh updates the onscreen contents of the widget

Jump to

Keyboard shortcuts

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