Documentation
¶
Overview ¶
Package config loads ~/.config/d2l/config.toml and resolves XDG paths.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheDir ¶ added in v0.2.0
func CacheDir() string
CacheDir holds files downloaded to be opened.
func EnsureFile ¶
EnsureFile writes the default config if none exists and returns its path.
Types ¶
type Config ¶
type Config struct {
// BaseURL is the Brightspace instance, without a trailing slash.
BaseURL string `toml:"base_url"`
// Browser is the browser `d2l login` launches, as a path or command. Empty means the default browser.
Browser string `toml:"browser"`
// Openers maps a file extension (no dot) to a command that runs detached, e.g. pdf = "zathura".
Openers map[string]string `toml:"openers"`
// TerminalOpeners maps an extension to a command that takes over the terminal, e.g. md = "nvim".
TerminalOpeners map[string]string `toml:"terminal_openers"`
// Concurrency is the number of parallel downloads.
Concurrency int `toml:"concurrency"`
}
Click to show internal directories.
Click to hide internal directories.