config

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Accent:        "Blue",
	Flavor:        "Mocha",
	InitBehaviour: "Do not fetch for Quick Selects",
}

Functions

func GetAccentColor

func GetAccentColor(flavor catppuccin.Flavor, accentName string) catppuccin.Color

GetAccentColor returns the accent color based on config

func GetAvailableAccents

func GetAvailableAccents() []string

GetAvailableAccents returns list of available accents

func GetAvailableFlavors

func GetAvailableFlavors() []string

GetAvailableFlavors returns list of available flavors

func GetCatppuccinFlavor

func GetCatppuccinFlavor(flavorName string) catppuccin.Flavor

GetCatppuccinFlavor returns the catppuccin flavor based on config

func GetConfigPath

func GetConfigPath() (string, error)

GetConfigPath returns the path to the config file

func IsValidAccent added in v0.6.1

func IsValidAccent(accent string) bool

func IsValidFlavor added in v0.6.1

func IsValidFlavor(flavor string) bool

Validation helpers

func IsValidInitBehaviour added in v0.10.0

func IsValidInitBehaviour(behaviour string) bool

func SaveConfig

func SaveConfig(config *Config) error

SaveConfig saves configuration to file

Types

type Config

type Config struct {
	Accent        string `json:"accent"`
	Flavor        string `json:"flavor"`
	InitBehaviour string `json:"init"`
}

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig loads configuration from file, creating default if it doesn't exist

Jump to

Keyboard shortcuts

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