config

package
v0.0.0-...-5b40ae8 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// TODO: Delete after implement check in Config
	ThemesDir = "%s/themes"
	// ConfigDir is $HOME/.altie directory
	ConfigDir = "%s/.altie"
	// RouteConfig is a const to replace by $HOME/.altie/altie.conf
	RouteConfig = "%s/.altie/altie.conf"
	// RouteThemes use $HOME/.altie/themes
	RouteThemes = "%s/.altie/themes"
	// AlacrittyDir is $HOME/.config/alacritty
	AlacrittyDir = "%s/.config/alacritty"
	// AlacrittyConfigDir is $HOME/.config/alacritty/alacritty.toml
	AlacrittyConfigDir = "%s/.config/alacritty/alacritty.toml"
)

Variables

This section is empty.

Functions

func CreateConfig

func CreateConfig(mainDir string) error

func GetHomeDir

func GetHomeDir() (string, error)

Types

type Config

type Config struct {
	ThemesDirectory string `toml:"ThemesDirectory"`
}

type ConfigThemes

type ConfigThemes struct {
	Config      `toml:"Config"`
	ThemeConfig `toml:"ConfigTheme"`
}

func CheckConfig

func CheckConfig(configDir string) (*ConfigThemes, error)

func (*ConfigThemes) SetModifiedThemes

func (config *ConfigThemes) SetModifiedThemes(homeDir string, lastMod time.Time, listThemes []string) error

type ThemeConfig

type ThemeConfig struct {
	Themes   []string `toml:"Themes"`
	LastMod  string   `toml:"LastModified"`
	FontSize int64    `toml:"FontSize"`
	Font     string   `toml:"Font"`
}

TODO: Implement a method to read and don't modify the themes

Jump to

Keyboard shortcuts

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