config

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusOnline     int8 = iota
	StatusOffline         = 2
	StatusNoNewSyncs      = 3
)

Variables

View Source
var VERSION string

Functions

func SetDefaults

func SetDefaults(cacheDir string)

Types

type Config

type Config struct {
	Debug         bool
	Log           string
	Proxy         string
	Browser       string
	RenderShadows bool
	RenderImages  bool
	RenderSplash  bool
	RenderBanner  bool

	Systems []SystemConfig

	Theme struct {
		Header struct {
			Selector ThemeItemConfig
			Spinner  ThemeItemConfig
		}

		DialogBox struct {
			Window struct {
				Focused ThemeItemConfig
				Blurred ThemeItemConfig
			}
			Titlebar struct {
				Focused ThemeItemConfig
				Blurred ThemeItemConfig
			}
			Bottombar ThemeItemConfig
		}

		ErrorDialogBox struct {
			Window struct {
				Focused ThemeItemConfig
				Blurred ThemeItemConfig
			}
			Titlebar struct {
				Focused ThemeItemConfig
				Blurred ThemeItemConfig
			}
			Bottombar ThemeItemConfig
		}

		PostsList struct {
			List struct {
				Focused ThemeItemConfig
				Blurred ThemeItemConfig
			}
			Item struct {
				Focused  ThemeItemConfig
				Blurred  ThemeItemConfig
				Selected ThemeItemConfig
			}
			ItemDetail struct {
				Focused  ThemeItemConfig
				Blurred  ThemeItemConfig
				Selected ThemeItemConfig
			}
		}

		PopupList struct {
			List struct {
				Focused ThemeItemConfig
				Blurred ThemeItemConfig
			}
			Item struct {
				Focused  ThemeItemConfig
				Blurred  ThemeItemConfig
				Selected ThemeItemConfig
			}
			ItemDetail struct {
				Focused  ThemeItemConfig
				Blurred  ThemeItemConfig
				Selected ThemeItemConfig
			}
		}

		Post struct {
			Author  ThemeItemConfig
			Subject ThemeItemConfig
		}

		Reply struct {
			Author ThemeItemConfig
		}
	}
}

func Load

func Load() (Config, error)

func (*Config) Save

func (cfg *Config) Save() error

type ServiceStatus

type ServiceStatus int8

type SystemConfig

type SystemConfig struct {
	Type   string
	Config map[string]interface{}
}

type ThemeItemConfig

type ThemeItemConfig struct {
	Foreground lipgloss.AdaptiveColor
	Background lipgloss.AdaptiveColor
	Border     struct {
		Foreground lipgloss.AdaptiveColor
		Background lipgloss.AdaptiveColor
		Border     lipgloss.Border
		Sides      []bool
	}
	Padding []int
	Margin  []int
}

Jump to

Keyboard shortcuts

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