Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandTilde ¶
ExpandTilde replaces a leading "~" in p with the user's home directory. Paths that do not start with "~" are returned unchanged.
Types ¶
type Config ¶
type Config struct {
General GeneralConfig `toml:"general"`
}
Config is the top-level configuration structure.
func Load ¶
Load reads a Config from path. If the file contains malformed TOML, a warning is logged and the default Config is returned (no error). Any other OS-level error (e.g. file not found) is returned as-is.
func (Config) DownloadDir ¶
DownloadDir returns the fully-expanded download directory path.
type GeneralConfig ¶
type GeneralConfig struct {
DownloadDir string `toml:"download_dir"`
DefaultSource string `toml:"default_source"`
MinResolution string `toml:"min_resolution"`
}
GeneralConfig holds the general section of the configuration file.
type WizardDoneMsg ¶
type WizardDoneMsg struct{ Config Config }
WizardDoneMsg is emitted when the wizard completes.
type WizardModel ¶
type WizardModel struct {
// contains filtered or unexported fields
}
WizardModel is the first-run setup wizard bubbletea component.
func NewWizard ¶
func NewWizard() WizardModel
NewWizard creates a WizardModel pre-populated with defaults.
func (WizardModel) Config ¶
func (w WizardModel) Config() Config
func (WizardModel) Done ¶
func (w WizardModel) Done() bool
func (WizardModel) Init ¶
func (w WizardModel) Init() tea.Cmd
func (WizardModel) Update ¶
func (w WizardModel) Update(msg tea.Msg) (WizardModel, tea.Cmd)
func (WizardModel) View ¶
func (w WizardModel) View() string