config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Browser added in v0.2.0

type Browser struct {
	HTTP *struct {
		Bin  string   `toml:"bin"`
		Args []string `toml:"args"`
	} `toml:"http, omitempty"`
}

Browser config

type Config

type Config struct {
	AutoUpdateInterval time.Duration
	Browser            *Browser
	Theme              Theme
	Podcast            Podcast
	CMDMode            KeyCMD
	Enter              KeyCMD
	Escape             KeyCMD
	NavLeftArrow       KeyCMD
	NavUpArrow         KeyCMD
	NavDownArrow       KeyCMD
	NavRightArrow      KeyCMD
	NavLeft            KeyCMD
	NavUp              KeyCMD
	NavDown            KeyCMD
	NavRight           KeyCMD
	NavPageUp          KeyCMD
	NavPageDown        KeyCMD
	Play               KeyCMD
	Download           KeyCMD
	OpenURL            KeyCMD
	MarkRead           KeyCMD
	MarkUnread         KeyCMD
	MarkFavorite       KeyCMD
	MarkUnfavorite     KeyCMD
	List               KeyCMD
	Subscription       KeyCMD
	Favorite           KeyCMD
	Help               KeyCMD
}

Config contains all relevant configuration data for the application

func Load

func Load(configDir string) *Config

Load will load the config into the application, if it does not exist it will create a default one. If an error occurs reading the config, it will use the default one.

type ExternalPlayer added in v0.2.0

type ExternalPlayer struct {
	Bin  string   `toml:"bin"`
	Args []string `toml:"args"`
}

ExternalPlayer config

type KeyCMD added in v0.2.0

type KeyCMD struct {
	Text  string
	Rune  rune
	IsKey bool
	Key   tcell.Key
}

KeyCMD contains everything needs to set the KeyBinding

type Podcast added in v0.2.0

type Podcast struct {
	AutoDownload   bool
	ExternalPlayer *ExternalPlayer `toml:"external_player, omitempty"`
}

Podcast config

type Theme added in v0.2.0

type Theme struct {
	ErrColor       tcell.Color
	SeparatorColor tcell.Color
	ReadColor      tcell.Color
	CMDBGColor     tcell.Color
	CMDFGColor     tcell.Color
	StatusBGColor  tcell.Color
	StatusFGColor  tcell.Color
	TitleBGColor   tcell.Color
	TitleFGColor   tcell.Color
	ListBGColor    tcell.Color
	ListFGColor    tcell.Color
	TreeBGColor    tcell.Color
	TreeFGColor    tcell.Color
	ContentBGColor tcell.Color
	ContentFGColor tcell.Color
}

Theme config

Jump to

Keyboard shortcuts

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