|
|
@ -69,8 +69,12 @@ func cmdSet(cmd []string) { |
|
|
|
func loadFromToml() { |
|
|
|
func loadFromToml() { |
|
|
|
configFile, env := os.LookupEnv("KBTUI_CFG") |
|
|
|
configFile, env := os.LookupEnv("KBTUI_CFG") |
|
|
|
if !env { |
|
|
|
if !env { |
|
|
|
|
|
|
|
configFile = "~/.config/kbtui.toml" |
|
|
|
|
|
|
|
if _, err := os.Stat(configFile); os.IsNotExist(err) { |
|
|
|
configFile = "kbtui.toml" |
|
|
|
configFile = "kbtui.toml" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
printInfoF("Loading config from toml: $TEXT", messageAttachmentColor.stylize(configFile)) |
|
|
|
printInfoF("Loading config from toml: $TEXT", messageAttachmentColor.stylize(configFile)) |
|
|
|
config, err := toml.LoadFile(configFile) |
|
|
|
config, err := toml.LoadFile(configFile) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|