config

package
v0.4.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reset

func Reset() error

func Save

func Save() error

Types

type Config

type Config struct {
	Token          string   `yaml:"token"`
	BufferSize     float64  `yaml:"buffer-size-ms"`
	RewindDuration float64  `yaml:"rewind-duration-s"`
	Volume         float64  `yaml:"volume"`
	Controls       Controls `yaml:"controls"`
}
var Current Config

type Controls

type Controls struct {
	// Main control
	Quit       Key `yaml:"quit"`
	Apply      Key `yaml:"apply"`
	Cancel     Key `yaml:"cancel"`
	CursorUp   Key `yaml:"cursor-up"`
	CursorDown Key `yaml:"cursor-down"`
	// Playlists control
	PlaylistsUp   Key `yaml:"playlists-up"`
	PlaylistsDown Key `yaml:"playlists-down"`
	// Track list control
	TracksLike    Key `yaml:"tracks-like"`
	TracksShare   Key `yaml:"tracks-share"`
	TracksShuffle Key `yaml:"tracks-shuffle"`
	TracksSearch  Key `yaml:"tracks-search"`
	// Player control
	PlayerPause          Key `yaml:"player-pause"`
	PlayerNext           Key `yaml:"player-next"`
	PlayerPrevious       Key `yaml:"player-previous"`
	PlayerRewindForward  Key `yaml:"player-rewind-forward"`
	PlayerRewindBackward Key `yaml:"player-rewind-backward"`
	PlayerLike           Key `yaml:"player-like"`
}

type Key

type Key string

func (Key) Binding

func (k Key) Binding() key.BindingOpt

func (Key) Contains

func (k Key) Contains(keyName string) bool

func (Key) Help

func (k Key) Help(help string) key.BindingOpt

func (Key) Key

func (k Key) Key() string

Jump to

Keyboard shortcuts

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