config

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Ellipsis            = "…"
	SingleFillCharacter = "─"
	DoubleFillCharacter = "═"
)

Variables

This section is empty.

Functions

func CreateReaderStyle

func CreateReaderStyle(t Theme) ansi.StyleConfig

Types

type Application added in v0.1.3

type Application struct {
	Path string   `yaml:"Path"`
	Args []string `yaml:"Args"`
}

type Applications added in v0.1.3

type Applications struct {
	Image Application `yaml:"Image"`
	Audio Application `yaml:"Audio"`
	Video Application `yaml:"Video"`
	HTML  Application `yaml:"HTML"`
}

type Configuration

type Configuration struct {
	Settings     Settings     `yaml:"Settings"`
	Keys         Keys         `yaml:"Keys"`
	Applications Applications `yaml:"Application"`
	Theme        Theme        `yaml:"Theme"`
}

func Load added in v0.1.0

func Load(configFile string) (Configuration, error)

type Keys added in v0.1.3

type Keys struct {
	Up              []string `yaml:"Up"`
	Down            []string `yaml:"Down"`
	Left            []string `yaml:"Left"`
	Right           []string `yaml:"Right"`
	Prev            []string `yaml:"Prev"`
	Next            []string `yaml:"Next"`
	Full            []string `yaml:"Full"`
	Start           []string `yaml:"Start"`
	End             []string `yaml:"End"`
	Quit            []string `yaml:"Quit"`
	ToggleThumbnail []string `yaml:"ToggleThumbnail"`
	OpenArticle     []string `yaml:"OpenArticle"`
	OpenVideo       []string `yaml:"OpenVideo"`
	OpenShortNews   []string `yaml:"OpenShortNews"`
	Help            []string `yaml:"Help"`
}

type Settings added in v0.1.3

type Settings struct {
	HideHelpOnStartup bool `yaml:"HideHelpOnStartup"`
	PreloadThumbnails bool `yaml:"PreloadThumbnails"`
}

type Style

type Style struct {
	TextHighlightStyle lipgloss.Style

	ActiveStyle            lipgloss.Style
	TitleActiveStyle       lipgloss.Style
	ListHeaderActiveStyle  lipgloss.Style
	ListActiveStyle        lipgloss.Style
	ReaderTitleActiveStyle lipgloss.Style
	ReaderInfoActiveStyle  lipgloss.Style

	InactiveStyle            lipgloss.Style
	TitleInactiveStyle       lipgloss.Style
	ListHeaderInactiveStyle  lipgloss.Style
	ListInactiveStyle        lipgloss.Style
	ReaderTitleInactiveStyle lipgloss.Style
	ReaderInfoInactiveStyle  lipgloss.Style

	// the normal item state
	ItemNormalTitle lipgloss.Style
	ItemNormalDesc  lipgloss.Style

	// he selected item state
	ItemSelectedTitle lipgloss.Style
	ItemSelectedDesc  lipgloss.Style

	// The breaking item state
	ItemBreakingTitle lipgloss.Style
	ItemBreakingDesc  lipgloss.Style

	ActiveTabBorder   lipgloss.Border
	InactiveTabBorder lipgloss.Border

	ReaderStyle ansi.StyleConfig
}

func NewsStyle

func NewsStyle(t Theme) (s Style)

type Theme added in v0.1.2

type Theme struct {
	PrimaryColor         string `yaml:"PrimaryColor"`
	ShadedColor          string `yaml:"ShadedColor"`
	HighlightColor       string `yaml:"HighlightColor"`
	HighlightShadedColor string `yaml:"HighlightShadedColor"`
	WarningColor         string `yaml:"WarningColor"`
	WarningShadedColor   string `yaml:"WarningShadedColor"`
	ReaderHighlightColor string `yaml:"ReaderHighlightColor"`
	ReaderHeadingColor   string `yaml:"ReaderHeadingColor"`
}

Jump to

Keyboard shortcuts

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