|
|
@ -73,14 +73,16 @@ func loadFromToml() { |
|
|
|
if _, err := os.Stat(configFile); os.IsNotExist(err) { |
|
|
|
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 { |
|
|
|
printError(fmt.Sprintf("Could not read config file: %+v", err)) |
|
|
|
printError(fmt.Sprintf("I Could not read config file: %+v", err)) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if config.Has("Emoji.unicodeSupport") { |
|
|
|
|
|
|
|
UNICODE_EMOJI_SUPPORT = config.Get("Emoji.unicodeSupport").(bool) |
|
|
|
|
|
|
|
} |
|
|
|
colorless = config.GetDefault("Basics.colorless", false).(bool) |
|
|
|
colorless = config.GetDefault("Basics.colorless", false).(bool) |
|
|
|
if config.Has("Basics.colorless") { |
|
|
|
if config.Has("Basics.colorless") { |
|
|
|
colorless = config.Get("Basics.colorless").(bool) |
|
|
|
colorless = config.Get("Basics.colorless").(bool) |
|
|
|