config

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultTheme

func DefaultTheme(conf *Config) (*termutil.Theme, error)

func IsErrRecoverable

func IsErrRecoverable(err error) bool

func LoadTheme

func LoadTheme(conf *Config) (*termutil.Theme, error)

func LoadThemeFromPath

func LoadThemeFromPath(conf *Config, path string) (*termutil.Theme, error)

Types

type Config

type Config struct {
	Opacity float64
	Font    Font
	Cursor  Cursor
}

func DefaultConfig

func DefaultConfig() *Config

func LoadConfig

func LoadConfig() (*Config, error)

func (*Config) Save

func (c *Config) Save() (string, error)

type Cursor added in v0.0.9

type Cursor struct {
	Image string
}

type ErrorFileNotFound

type ErrorFileNotFound struct {
	Path string
}

func (*ErrorFileNotFound) Error

func (e *ErrorFileNotFound) Error() string

type Font

type Font struct {
	Family    string
	Size      float64
	DPI       float64
	Ligatures bool
}

type RecoverableError

type RecoverableError struct {
	// contains filtered or unexported fields
}

func NewRecoverableError

func NewRecoverableError(msg string, cause error) *RecoverableError

func (*RecoverableError) Error

func (e *RecoverableError) Error() string

type Theme

type Theme struct {
	Black               string
	Red                 string
	Green               string
	Yellow              string
	Blue                string
	Magenta             string
	Cyan                string
	White               string
	BrightBlack         string
	BrightRed           string
	BrightGreen         string
	BrightYellow        string
	BrightBlue          string
	BrightMagenta       string
	BrightCyan          string
	BrightWhite         string
	Background          string
	Foreground          string
	SelectionBackground string
	SelectionForeground string
	CursorForeground    string
	CursorBackground    string
}

func (*Theme) Save

func (t *Theme) Save() (string, error)

Jump to

Keyboard shortcuts

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