config

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BorderStyles added in v1.4.2

func BorderStyles() []string

Returns all available border styles

func ColorSchemes added in v1.4.2

func ColorSchemes() []string

Returns all available color schemes

func GlyphStyles added in v1.6.9

func GlyphStyles() []string

Returns all available border styles

Types

type Borders added in v1.4.2

type Borders struct {
	Horizontal  rune
	Vertical    rune
	TopLeft     rune
	TopRight    rune
	BottomLeft  rune
	BottomRight rune

	HorizontalFocus  rune
	VerticalFocus    rune
	TopLeftFocus     rune
	TopRightFocus    rune
	BottomLeftFocus  rune
	BottomRightFocus rune
}

Borders contains all border elements of our border style

type Colors added in v1.4.2

type Colors struct {
	Accent                      tcell.Color
	Title                       tcell.Color
	SearchBar                   tcell.Color
	PackagelistSourceRepository tcell.Color
	PackagelistSourceAUR        tcell.Color
	PackagelistHeader           tcell.Color
	SettingsFieldBackground     tcell.Color
	SettingsFieldText           tcell.Color
	SettingsFieldLabel          tcell.Color
	SettingsDropdownNotSelected tcell.Color
	DefaultBackground           tcell.Color
	StylePKGBUILD               string
	// contains filtered or unexported fields
}

Colors contains all colors of our color scheme

type Glyphs added in v1.6.9

type Glyphs struct {
	Package      string
	Installed    string
	NotInstalled string
	PrefixState  string
	SuffixState  string
	Settings     string
	Pkgbuild     string
	Help         string
	Upgrades     string
}

type Settings

type Settings struct {
	AurRpcUrl               string
	AurTimeout              int
	AurSearchDelay          int
	AurUseDifferentCommands bool
	AurInstallCommand       string
	AurUpgradeCommand       string
	DisableAur              bool
	MaxResults              int
	PacmanDbPath            string
	PacmanConfigPath        string
	InstallCommand          string
	UninstallCommand        string
	SysUpgradeCommand       string
	SearchMode              string
	SearchBy                string
	CacheExpiry             int
	DisableCache            bool
	ColorScheme             string
	BorderStyle             string
	ShowPkgbuildCommand     string
	ShowPkgbuildInternally  bool
	ComputeRequiredBy       bool
	GlyphStyle              string
	DisableNewsFeed         bool
	FeedURLs                string
	FeedMaxItems            int
	SaveWindowLayout        bool
	LeftProportion          int
	Transparent             bool
	PackageColumnWidth      int
	EnableAutoSuggest       bool
	SepDepsWithNewLine      bool
	// contains filtered or unexported fields
}

Settings is a structure containing our configuration data

func Defaults

func Defaults() *Settings

Defaults returns the default settings

func Load

func Load() (*Settings, error)

Load is loading our settings from the config file

func (*Settings) Colors added in v1.4.2

func (s *Settings) Colors() Colors

Colors exposes our current set of colors

func (*Settings) Glyphs added in v1.6.9

func (s *Settings) Glyphs() Glyphs

Colors exposes our current set of colors

func (*Settings) Save

func (s *Settings) Save() error

Save is creating / overwriting our configuration file ./config/rpcsearch/config.json

func (*Settings) SetBorderStyle added in v1.4.2

func (s *Settings) SetBorderStyle(style string)

func (*Settings) SetColorScheme added in v1.4.2

func (s *Settings) SetColorScheme(scheme string) error

SetColorScheme applies a color scheme

func (*Settings) SetGlyphStyle added in v1.6.9

func (s *Settings) SetGlyphStyle(style string) error

SetGlyphStyle sets a glyph style

func (*Settings) SetTransparency added in v1.7.3

func (s *Settings) SetTransparency(enable bool)

SetTransparency switched transparency on or off

Jump to

Keyboard shortcuts

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