clock

package
v0.0.0-...-ad944e5 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewModule

func NewModule(mctx barbara.ModuleContext) (barbara.Module, error)

NewModule returns a new clock Module instance.

Types

type Config

type Config struct {
	// Format is a Go time format string. See the Go documentation for more information.
	Format string `json:"format"`
}

Config holds all clock module configuration.

type Module

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

Module is a Barbara Module that presents a clock. It uses Go's time formatting, and is basically just a label that gets updated every second.

func (*Module) Destroy

func (m *Module) Destroy() error

Destroy stops background processes and frees up resources.

func (*Module) Render

func (m *Module) Render() (widgets.QLayout_ITF, error)

Render attempts starts a background process to update the time displayed in a label that is then returned to be placed on a bar.

Jump to

Keyboard shortcuts

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