Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataDir ¶
DataDir returns the data directory (~/.local/share/oku on macOS and Linux, %LocalAppData%\oku on Windows).
func EnsureConfigDir ¶
func EnsureConfigDir() error
EnsureConfigDir creates the config directory if it doesn't exist.
func EnsureDataDir ¶
func EnsureDataDir() error
EnsureDataDir creates the data directory if it doesn't exist.
func FilePath ¶
FilePath returns the config file path (~/.config/oku/config.toml on macOS and Linux, %AppData%\oku\config.toml on Windows).
func SetTheme ¶ added in v0.9.0
SetTheme writes the `theme` key to the config file. The file is rewritten line by line rather than re-encoded from a Config, so a hand-written config keeps its comments, its key order and any key this build does not know about. name is one of the values the TUI accepts, validated by the caller.
Types ¶
type Config ¶
type Config struct {
Editor string `toml:"editor"`
UseFzf bool `toml:"use_fzf"`
DefaultList string `toml:"default_list"`
// Theme picks the palette the TUI and the coloured CLI output draw with:
// "auto" (the default) lets the terminal report its background, "dark"
// and "light" pin it, and a named palette ("nord", "dracula", …) replaces
// the built-in one. `oku config theme` lists them.
Theme string `toml:"theme"`
}
Config holds the application configuration.