config

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRetroTerminalTheme

func IsRetroTerminalTheme(name string) bool

NormalizeDisplayDensity returns "comfortable" or "compact". Empty or unrecognized values default to "compact". IsRetroTerminalTheme is true for vt52 / vt100 (optional palette overrides in display config).

func NormalizeDisplayDensity

func NormalizeDisplayDensity(s string) string

func Save

func Save(cfg Config) error

Types

type AIConfig

type AIConfig struct {
	Provider            string `toml:"provider"` // "openai" | "claude" | "gemini" | "ollama" | ""
	OpenAIKey           string `toml:"openai_key"`
	ClaudeKey           string `toml:"claude_key"`
	GeminiKey           string `toml:"gemini_key"`
	OllamaURL           string `toml:"ollama_url"`
	OllamaModel         string `toml:"ollama_model"`
	SavePath            string `toml:"save_path"`
	MarkReadOnSummarize bool   `toml:"mark_read_on_summarize"`
}

type Config

type Config struct {
	Theme   string        `toml:"theme"`
	Display DisplayConfig `toml:"display"`
	Feed    FeedConfig    `toml:"feed"`
	Updates UpdatesConfig `toml:"updates"`
	AI      AIConfig      `toml:"ai"`
	Source  SourceConfig  `toml:"source"`
}

func DefaultConfig

func DefaultConfig() Config

func Load

func Load() (Config, error)

type DisplayConfig

type DisplayConfig struct {
	Icons             bool               `toml:"icons"`
	DateFormat        string             `toml:"date_format"` // "relative" | "absolute"
	MarkReadOnOpen    bool               `toml:"mark_read_on_open"`
	MarkReadOnFocus   bool               `toml:"mark_read_on_focus"`
	FocusLine         bool               `toml:"focus_line"`
	DefaultUnreadOnly bool               `toml:"default_unread_only"`
	ActionableLinks   bool               `toml:"actionable_links"`
	Browser           string             `toml:"browser"`
	Density           string             `toml:"density"` // "comfortable" | "compact"
	VT52              RetroTerminalTweak `toml:"vt52"`
	VT100             RetroTerminalTweak `toml:"vt100"`
}

type FeedConfig

type FeedConfig struct {
	MaxBodyMiB int `toml:"max_body_mib"`
}

type RetroTerminalTweak

type RetroTerminalTweak struct {
	Bg     string `toml:"bg"`
	Fg     string `toml:"fg"`
	Accent string `toml:"accent"`
}

RetroTerminalTweak holds optional #rrggbb overrides for vt52 / vt100 built-in themes (empty = default palette).

type SourceConfig

type SourceConfig struct {
	GReaderURL      string `toml:"greader_url"`
	GReaderLogin    string `toml:"greader_login"`
	GReaderPassword string `toml:"greader_password"`
}

type UpdatesConfig

type UpdatesConfig struct {
	CheckOnStartup     bool   `toml:"check_on_startup"`
	CheckIntervalHours int    `toml:"check_interval_hours"`
	LastCheckedUnix    int64  `toml:"last_checked_unix"`
	DismissedVersion   string `toml:"dismissed_version"`
	AvailableVersion   string `toml:"available_version"`
	AvailableSummary   string `toml:"available_summary"`
	AvailablePublished int64  `toml:"available_published_unix"`
}

Jump to

Keyboard shortcuts

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