config

package
v0.0.0-...-db328d6 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const S_HOME = "HOME"

Variables

This section is empty.

Functions

func Dir

func Dir() string

func EnsureExists

func EnsureExists(conf *Config) bool

func GetCacheDir

func GetCacheDir() string

func GetStateDir

func GetStateDir() string

func Path

func Path() string

func Save

func Save(conf *Config) error

Types

type Config

type Config struct {
	TextSize int `toml:"text_size"`

	Spacing       int `toml:"spacing"`
	InnerSpacing  int `toml:"inner_spacing"`
	WindowWidth   int `toml:"window_width"`
	WindowHeight  int `toml:"window_height"`
	WindowMargins int `toml:"window_margins"`

	BackgroundColor string `toml:"background_color" doc:"Background color (name or hex)"`
	TextColor       string `toml:"text_color" doc:"Text color (name or hex)"`

	RefreshIntervalSeconds int `toml:"refresh_interval_seconds"`

	RefreshIntervalSecondsByType map[string]int `toml:"refresh_interval_seconds_by_type"`

	BypassWindowManager bool `toml:"bypass_window_manager"`

	ShowFetchTime []string `toml:"show_fetch_time"`

	LogLevel string `toml:"log_level" doc:"Log level"`

	TimeoutMS map[string]int `toml:"timeout_ms"`

	WebEnable bool   `toml:"web_enable"`
	WebExpose bool   `toml:"web_expose"`
	WebPort   string `toml:"web_port"`

	Assets []*asset.Asset `toml:"assets"`
}

TOML config structure

func Load

func Load() *Config

func (*Config) ProviderTimeout

func (conf *Config) ProviderTimeout(name string) time.Duration

Jump to

Keyboard shortcuts

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