Documentation
¶
Overview ¶
Package config manages the tuify config file. It resolves the platform-appropriate directory (respecting XDG_CONFIG_HOME on Unix-likes), loads and validates the on-disk JSON, and writes updates with safe permissions.
The zero-value Config is not usable — callers construct a Config via Load (existing file) or first-time setup in bootstrap, then call Validate before handing it off. Dir is exported so other packages (auth, librespot cache, debug log) can place their files next to config.json without re-implementing the platform-choice logic.
Index ¶
Constants ¶
View Source
const DefaultRedirectURL = "http://127.0.0.1:4444/callback"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
ClientID string `json:"client_id"`
EnableLibrespot bool `json:"enable_librespot,omitempty"`
LibrespotPath string `json:"librespot_path,omitempty"`
DeviceName string `json:"device_name,omitempty"`
Bitrate int `json:"bitrate,omitempty"`
SpotifyUsername string `json:"spotify_username,omitempty"`
RedirectURL string `json:"redirect_url,omitempty"`
AudioBackend string `json:"audio_backend,omitempty"`
VimMode bool `json:"vim_mode,omitempty"`
// Appearance forces dark or light palette selection. Empty (omitted)
// uses lipgloss's terminal-background autodetection. Valid: "", "dark",
// "light".
Appearance string `json:"appearance,omitempty"`
Theme theme.Theme `json:"theme,omitzero"`
}
Click to show internal directories.
Click to hide internal directories.