config

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InlineHint

func InlineHint(key string) string

func IsColorKey

func IsColorKey(key string) bool

func IsInlineHintKey

func IsInlineHintKey(key string) bool

func ResolveDir

func ResolveDir(raw string, fallback string) (string, error)

func Save

func Save(cfg *Config) error

Types

type Colors

type Colors struct {
	Primary   string `yaml:"primary"`
	Secondary string `yaml:"secondary"`
	Text      string `yaml:"text"`
	Dim       string `yaml:"dim"`
	Title     string `yaml:"title"`
	Footer    string `yaml:"footer"`
	Error     string `yaml:"error"`
	Success   string `yaml:"success"`
}

type Config

type Config struct {
	Colors Colors `yaml:"colors"`
	System System `yaml:"system"`
}

func Default

func Default() *Config

func Load

func Load() (*Config, error)

func (Config) Get

func (c Config) Get(key string) string

func (Config) Sections

func (c Config) Sections() []Section

func (*Config) Set

func (c *Config) Set(key, value string)

type Section

type Section struct {
	Title string
	Keys  []string
}

type System

type System struct {
	ConfigPath string `yaml:"config"`
	WordsDir   string `yaml:"words"`
	QuotesDir  string `yaml:"quotes"`
}

Jump to

Keyboard shortcuts

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