config

package
v0.0.0-...-e53a3c9 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName = "Jellycli"
	Version = "0.0.1"

	AudioSamplingRate = 44100
	AudioBufferPeriod = time.Millisecond * 50

	// Volume range, not absolute values
	AudioMinVolumeDb = -6
	AudioMaxVolumeDb = 0

	AudioMinVolume = 0
	AudioMaxVolume = 100

	// Audio volume is logarithmic, which base to use
	AudioVolumeLogBase = 2

	Debug = false

	CacheTimeout = time.Minute * 5

	SongHistorySize = 100

	LatestMusicCount = "50"
)

Variables

View Source
var (
	ColorBackground   = tcell.Color234 //Dark gray
	ColorPrimary      = tcell.Color51  // Cyan
	ColorPrimaryDim   = tcell.Color44  // Ligh cyan
	ColorSecondary    = tcell.Color141 //
	ColorSecondaryDim = tcell.Color134
	ColorBorder       = tcell.Color246 // Gray
	ColorBorderFocus  = tcell.Color253
	ColroMainFrame    = tcell.Color246 // Lighter gray
	ColorControls     = tcell.Color202 // Orange
	ColorProgress     = tcell.Color202 // Orange
	ColorNavBar       = tcell.Color24
	ColorNavBarBtn    = tcell.Color31
	ColorLightext     = tcell.Color250
)
View Source
var GridBordersColor = ColorSecondary
View Source
var GridBordersShow = true
View Source
var (
	KeyBinds = DefaultKeyBindings()
)

Functions

func DebugGridBorders

func DebugGridBorders(view *tview.Grid)

DebugGridBorders enables grid borders if config.Debug is true and if config.GridBordesShow is true Else do nothing

func ReadUserInput

func ReadUserInput(name string, mask bool) (string, error)

Types

type GlobalBindings

type GlobalBindings struct {
	PlayPause  tcell.Key
	Next       tcell.Key
	Previous   tcell.Key
	Forward    tcell.Key
	Backward   tcell.Key
	VolumeUp   tcell.Key
	VolumeDown tcell.Key
	MuteUnmute tcell.Key
}

GlobalBindings can have only one action since they override all others

type KeyBindings

type KeyBindings struct {
	Global        GlobalBindings
	NavigationBar NavigationBarBindings
	Moving        MovingBindings
	Panel         PanelBindings
}

func DefaultKeyBindings

func DefaultKeyBindings() KeyBindings

type MovingBindings

type MovingBindings struct {
	Up       tcell.Key
	Down     tcell.Key
	Left     tcell.Key
	Right    tcell.Key
	UpAlt    tcell.Key
	DownAlt  tcell.Key
	LeftAlt  tcell.Key
	RightAlt tcell.Key
}

MovingBindings control moving cursor inside panel

type NavigationBarBindings struct {
	Quit     tcell.Key
	Help     tcell.Key
	View     tcell.Key
	Search   tcell.Key
	Queue    tcell.Key
	History  tcell.Key
	Settings tcell.Key
}

NavigationBarBindings also override every other key

type PanelBindings

type PanelBindings struct {
	MovingBindings
}

PanelBindings moving between panels

type Secret

type Secret interface {
	EnsureKey(name string) (string, error)
	GetKey(name string) (string, error)
	SetKey(name string, value string) error
}

func NewSecretStore

func NewSecretStore() (Secret, error)

NewSecretStore instantiates new connection to wallet

Jump to

Keyboard shortcuts

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