Documentation
¶
Overview ¶
Package config loads the spotui settings file and resolves the paths where spotui keeps its state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// ClientID is the client ID of the user's own Spotify developer app. It is
// used only for Web API calls (search and saved albums).
ClientID string `toml:"client_id"`
// RedirectPort is the loopback port of the Web API login callback. The
// developer app must list http://127.0.0.1:<port>/callback.
RedirectPort int `toml:"redirect_port"`
DeviceName string `toml:"device_name"`
AudioBackend string `toml:"audio_backend"`
AudioDevice string `toml:"audio_device"`
Bitrate int `toml:"bitrate"`
InitialVolume int `toml:"initial_volume"`
// CoverArt selects how cover images are drawn: "auto", "kitty",
// "blocks", or "off".
CoverArt string `toml:"cover_art"`
}
Config holds the user settings from config.toml.
type Paths ¶
type Paths struct {
ConfigDir string
StateDir string
ConfigFile string
PlayerState string
WebAPIToken string
LogFile string
}
Paths are the files spotui reads and writes.
func ResolvePaths ¶
ResolvePaths returns the spotui paths. The config file is in the user config directory. The login, the token, and the log are in the state directory of the operating system.
func (Paths) EnsureDirs ¶
EnsureDirs creates the config and state directories.
Click to show internal directories.
Click to hide internal directories.