config

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorOptionAuto colorOption = iota
	ColorOptionAlways
	ColorOptionNever
)

Variables

View Source
var ColorOptionDefault = ColorOptionAuto.String()

Functions

func NewConfigFromFile

func NewConfigFromFile(filePath string, cfg *File) error

NewConfigFromFile reads in config file and ENV variables if set.

Types

type File

type File struct {
	Projects domain.ProjectListKeyed

	Filename string
	Color    string
	Settings domain.Settings
	// contains filtered or unexported fields
}

File represents a config file with projects and settings.

func (*File) Convert

func (f *File) Convert() error

Convert handles deprecated config formats.

type Theme

type Theme struct {
	// General
	Normal        lipgloss.Style
	PreviewHeader lipgloss.Style
	Bullet        lipgloss.Style

	// Project
	ProjectTitle lipgloss.Style
	Provider     lipgloss.Style
	Desc         lipgloss.Style

	// Repository
	RepoTitle lipgloss.Style
	RepoPath  lipgloss.Style
	GitOutput lipgloss.Style

	// Branch
	BranchName      lipgloss.Style
	BranchCurrent   lipgloss.Style
	BranchIndicator lipgloss.Style
	RemoteName      lipgloss.Style

	// Tag
	TagIndicator lipgloss.Style

	// Status
	Modified  lipgloss.Style
	Untracked lipgloss.Style
	Diff      lipgloss.Style
	Error     lipgloss.Style

	// List table
	TableBorder      lipgloss.Border
	TableBorderStyle lipgloss.Style
	TableHeader      lipgloss.Style
	TableRowEven     lipgloss.Style
	TableRowOdd      lipgloss.Style

	// Chart
	ChartDates lipgloss.Style
}

func NewThemeDefault

func NewThemeDefault() Theme

func (*Theme) ParseConfig

func (t *Theme) ParseConfig(cfg domain.Theme) (err error)

func (Theme) TableRowStyle

func (t Theme) TableRowStyle(row, _ int) lipgloss.Style

Jump to

Keyboard shortcuts

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