clock

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ClickID = "clock"

ClickID is the hit-box identifier emitted on the clock's segment. The main loop matches on it to trigger the hover calendar popup.

View Source
const DefaultIcon = "\U000f144f"

DefaultIcon is the Nerd Font codepoint used when the caller doesn't override Clock.Icon — mdi-clock-time-eight-outline.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock struct {
	Format string
	Icon   string
	FG     color.RGBA
	BG     color.RGBA
	// contains filtered or unexported fields
}

Clock is a periodic clock module. Format follows time.Format conventions.

func New

func New(format string, fg, bg color.RGBA) *Clock

New builds a clock module. Pass "" for default format ("15:04").

func (*Clock) Name

func (c *Clock) Name() string

func (*Clock) Render

func (c *Clock) Render() []module.Segment

func (*Clock) Start

func (c *Clock) Start(ctx context.Context) <-chan struct{}

Jump to

Keyboard shortcuts

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