cpu

package
v0.0.0-...-895549d Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CpuModule

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

func (*CpuModule) Channels

func (mod *CpuModule) Channels() (<-chan bool, chan<- modules.Event)

func (*CpuModule) Dependencies

func (mod *CpuModule) Dependencies() []string

func (*CpuModule) Name

func (mod *CpuModule) Name() string

func (*CpuModule) Render

func (mod *CpuModule) Render() []modules.EventCell

func (*CpuModule) Run

func (mod *CpuModule) Run() (<-chan bool, chan<- modules.Event, error)

type MouseOptions

type MouseOptions struct {
	Fg     *config.Color    `yaml:"fg"`
	Bg     *config.Color    `yaml:"bg"`
	Cursor *config.Cursor   `yaml:"cursor"`
	Tick   *config.Duration `yaml:"tick"`
	Format *config.Format   `yaml:"format"`
}

these field names need to match exactly the ones in Options (coz ya know, reflections ;) kill me. But they do enable cleaner per-module config code so it was worth it. Also Rob Pike is such a goated guy Read his wise words: https://go.dev/blog/laws-of-reflection

type Options

type Options struct {
	Fg        config.Color                      `yaml:"fg"`
	Bg        config.Color                      `yaml:"bg"`
	Cursor    config.Cursor                     `yaml:"cursor"`
	Tick      config.Duration                   `yaml:"tick"`
	Format    config.Format                     `yaml:"format"`
	Threshold ThresholdOptions                  `yaml:"threshold"`
	OnClick   config.MouseActions[MouseOptions] `yaml:"onmouse"`
}

type ThresholdOptions

type ThresholdOptions struct {
	Percent config.Percent  `yaml:"percent"`
	For     config.Duration `yaml:"for"`
	Fg      config.Color    `yaml:"fg"`
	Bg      config.Color    `yaml:"bg"`
}

Jump to

Keyboard shortcuts

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