counter

package
v0.0.0-...-c936f35 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Package counter demonstrates an extremely simple i3bar module that shows a counter which can be chnaged by clicking on it. It showcases the asynchronous nature of i3bar modules when written in go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

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

Module represents a "counter" module that displays a count in the given format, and adjusts the count on click/scroll. This module exemplifies the event-based architecture of barista.

func New

func New(format string) *Module

New constructs a new counter module.

func (*Module) Format

func (m *Module) Format(format string) *Module

Format sets the output format. The given format string will receive the counter value as the only argument.

func (*Module) Stream

func (m *Module) Stream(s bar.Sink)

Stream starts the module.

Jump to

Keyboard shortcuts

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