config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureExists

func EnsureExists(conf *Config) error

func GetConfigDir

func GetConfigDir() string

func Path

func Path() string

func Save

func Save(conf *Config) error

Types

type Config

type Config struct {
	DirectoryList []string `toml:"directory_list"`

	Style string `toml:"style"`

	ArticleStyle string `toml:"article_style"`

	FontFamily string `toml:"font_family"`
	FontSize   int    `toml:"font_size"`

	SearchOnType          bool `toml:"search_on_type"`
	SearchOnTypeMinLength int  `toml:"search_on_type_min_length"`

	HeaderTemplate string `toml:"header_template"`

	HistoryDisable  bool `toml:"history_disable"`
	HistoryAutoSave bool `toml:"history_auto_save"`
	HistoryMaxSize  int  `toml:"history_max_size"`

	MostFrequentDisable  bool `toml:"most_frequent_disable"`
	MostFrequentAutoSave bool `toml:"most_frequent_auto_save"`
	MostFrequentMaxSize  int  `toml:"most_frequent_max_size"`

	FavoritesAutoSave bool `toml:"favorites_auto_save"`

	MaxResultsTotal int `toml:"max_results_total"`

	Audio bool `toml:"audio"`

	EmbedExternalStylesheet bool `toml:"embed_external_stylesheet"`

	ColorMapping map[string]string `toml:"color_mapping"`

	PopupStyleStr string `toml:"popup_style_str"`

	WheelZoomFactor float64 `toml:"wheel_zoom_factor"`

	ArticleArrowKeys bool `toml:"article_arrow_keys"`
}

func Default

func Default() *Config

func Load

func Load() (*Config, error)

func MustLoad

func MustLoad() *Config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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