Documentation
¶
Index ¶
- func DefaultPath() (string, error)
- func WriteDefault(path string, force bool) error
- type AudioConfig
- type ByteSize
- type CacheConfig
- type Config
- type IPCConfig
- type LibraryConfig
- type LrcLibCacheConfig
- type LrcLibConfig
- type LyricsConfig
- type MPRISConfig
- type SingleInstanceMode
- type TUIConfig
- type ThemeConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultPath ¶
DefaultPath returns the default config file path.
func WriteDefault ¶
WriteDefault writes a default config to path.
Types ¶
type AudioConfig ¶
type AudioConfig struct {
SampleRate int `toml:"sample_rate" comment:"Output sample rate in Hz. 44100 is a safe default."`
ResampleQuality int `` /* 209-byte string literal not displayed */
BufferMs int `toml:"buffer_ms" comment:"Speaker buffer size in milliseconds (lower = lower latency, higher = more stable)."`
}
AudioConfig holds audio-related settings.
func (AudioConfig) Validate ¶ added in v0.9.8
func (c AudioConfig) Validate() error
Validate ensures audio settings are sane.
type ByteSize ¶ added in v0.9.6
type ByteSize int64
ByteSize stores a byte count and marshals to TOML as a unit-bearing string.
func (ByteSize) MarshalText ¶ added in v0.9.6
MarshalText serializes a byte size as an explicit unit-bearing string.
func (*ByteSize) UnmarshalText ¶ added in v0.9.6
UnmarshalText parses a byte size string with an explicit supported unit.
type CacheConfig ¶
type CacheConfig struct {
Dir string `toml:"dir" comment:"Base directory where cache files are stored"`
}
type Config ¶
type Config struct {
Audio AudioConfig `toml:"audio"`
MPRIS MPRISConfig `toml:"mpris"`
IPC IPCConfig `toml:"ipc"`
TUI TUIConfig `toml:"tui"`
Lyrics LyricsConfig `toml:"lyrics"`
Cache CacheConfig `toml:"cache"`
Library LibraryConfig `toml:"library"`
}
Config is the root configuration object.
type IPCConfig ¶ added in v0.9.7
type IPCConfig struct {
SingleInstance SingleInstanceMode `toml:"single_instance" comment:"Single-instance handoff method: auto, unix-socket, or off."`
}
IPCConfig holds single-instance IPC settings.
type LibraryConfig ¶ added in v0.9.6
type LibraryConfig struct {
MaxArchiveMemberSize ByteSize `toml:"max_archive_member_size" comment:"Maximum decoded size of one file inside an archive."`
}
LibraryConfig holds media library settings.
func (LibraryConfig) Validate ¶ added in v0.9.8
func (c LibraryConfig) Validate() error
Validate ensures library settings are sane.
type LrcLibCacheConfig ¶
type LrcLibCacheConfig struct {
Enabled bool `toml:"enabled" comment:"Enable on-disk cache for lyrics"`
}
type LrcLibConfig ¶
type LrcLibConfig struct {
Enabled bool `toml:"enabled" comment:"Enable lrclib.net integration for obtaining lyrics."`
Cache LrcLibCacheConfig `toml:"cache"`
}
type LyricsConfig ¶
type LyricsConfig struct {
LrcLib LrcLibConfig `toml:"lrclib"`
}
type MPRISConfig ¶
type MPRISConfig struct {
Enabled bool `toml:"enabled" comment:"Enable DBus/MPRIS integration for media controls."`
}
MPRISConfig holds DBus/MPRIS integration settings.
type SingleInstanceMode ¶ added in v0.9.7
type SingleInstanceMode string
SingleInstanceMode selects the IPC method used for single-instance handoff.
const ( // SingleInstanceAuto uses the platform's preferred supported IPC method. SingleInstanceAuto SingleInstanceMode = "auto" // SingleInstanceUnixSocket explicitly requires Unix-socket IPC. SingleInstanceUnixSocket SingleInstanceMode = "unix-socket" // SingleInstanceOff disables single-instance IPC handoff. SingleInstanceOff SingleInstanceMode = "off" )
type TUIConfig ¶
type TUIConfig struct {
FPS int `toml:"FPS" comment:"Frames per second for the terminal UI (1-120)."`
ArtworkRenderer string `toml:"artwork_renderer" comment:"Album artwork renderer: auto, kitty, blocks, or none."`
ArtworkAspect float64 `toml:"artwork_aspect" comment:"Artwork box width/height ratio for terminal cells (e.g., 2.0 looks square on most fonts)."`
BrowserHome string `toml:"browser_home" comment:"Default directory of music browser"`
Theme ThemeConfig `toml:"theme"`
}
type ThemeConfig ¶ added in v0.9.3
type ThemeConfig struct {
Preset string `toml:"preset" comment:"Built-in theme preset."`
Primary string `toml:"primary,omitempty" comment:"Override the main accent color (e.g., highlighting selected items)."`
Secondary string `toml:"secondary,omitempty" comment:"Override the secondary accent color (e.g., search highlights, minor elements)."`
Muted string `toml:"muted,omitempty" comment:"Override faded or dimmed text."`
Highlight string `toml:"highlight,omitempty" comment:"Override the highlight color."`
Info string `toml:"info,omitempty" comment:"Override info indications."`
Danger string `toml:"danger,omitempty" comment:"Override danger indications."`
Warning string `toml:"warning,omitempty" comment:"Override warning indications."`
Working string `toml:"working,omitempty" comment:"Override working indications."`
Background string `toml:"background,omitempty" comment:"Override the background color; use 'terminal' for the terminal default."`
Foreground string `toml:"foreground,omitempty" comment:"Override the foreground color; use 'terminal' for the terminal default."`
}