config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfigPath

func DefaultConfigPath() string

DefaultConfigPath returns the default config file path Uses os.UserConfigDir() for cross-platform support:

  • macOS: ~/Library/Application Support/lifx/config.yaml
  • Linux: ~/.config/lifx/config.yaml (or $XDG_CONFIG_HOME/lifx/config.yaml)
  • Windows: %AppData%\lifx\config.yaml

func EnsureConfigDir

func EnsureConfigDir() error

EnsureConfigDir creates the config directory if it doesn't exist

Types

type Config

type Config struct {
	Presets []Preset `yaml:"presets"`
}

Config represents the application configuration

func Load

func Load() (*Config, error)

Load reads the config from the default path, returning nil if not found

func LoadFrom

func LoadFrom(path string) (*Config, error)

LoadFrom reads the config from the specified path

type Preset

type Preset struct {
	Name       string `yaml:"name"`
	Hue        int    `yaml:"hue"`
	Saturation int    `yaml:"saturation"`
	Kelvin     int    `yaml:"kelvin"`
}

Preset represents a color preset configuration

Jump to

Keyboard shortcuts

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