Documentation
¶
Overview ¶
Package config loads and represents the wrongtop user configuration.
Index ¶
Constants ¶
View Source
const Sample = `` /* 971-byte string literal not displayed */
Sample is an annotated example configuration, printed by `wrongtop config-sample`.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Theme string `yaml:"theme"`
Refresh Duration `yaml:"refresh"`
Layout string `yaml:"layout"` // full | compact | minimal
Modules Modules `yaml:"modules"` //nolint:gocritic // grouped YAML namespace
Thresholds Thresholds `yaml:"thresholds"`
Keys Keys `yaml:"keys"`
ReadOnly bool `yaml:"read_only,omitempty"` // no process signaling
NerdFonts bool `yaml:"nerd_fonts,omitempty"`
Border string `yaml:"border,omitempty"` // rounded | square panel corners
}
Config is the top-level wrongtop configuration.
type Duration ¶
Duration wraps time.Duration so it can round-trip through YAML as a human-friendly string such as "1s" or "500ms".
type Modules ¶
type Modules struct {
Docker bool `yaml:"docker"`
Processes bool `yaml:"processes"`
Sensors bool `yaml:"sensors"` // temperatures, fans, battery
Connections bool `yaml:"connections"` // live TCP table
}
Modules toggles optional feature tabs.
type Thresholds ¶
type Thresholds struct {
CPUWarn float64 `yaml:"cpu_warn"`
CPUCrit float64 `yaml:"cpu_crit"`
MemWarn float64 `yaml:"mem_warn"`
MemCrit float64 `yaml:"mem_crit"`
TempWarn float64 `yaml:"temp_warn"` // °C
TempCrit float64 `yaml:"temp_crit"` // °C
}
Thresholds controls when metric values change from normal to warning to critical colors.
Click to show internal directories.
Click to hide internal directories.