Browse Source

added emoji config file support

pull/34/head
David Haukeness 5 years ago
parent
commit
4cc825860e
No known key found for this signature in database
GPG Key ID: A7F1091956853EF9
  1. 6
      cmdSet.go

6
cmdSet.go

@ -73,14 +73,16 @@ func loadFromToml() { @@ -73,14 +73,16 @@ func loadFromToml() {
if _, err := os.Stat(configFile); os.IsNotExist(err) {
configFile = "kbtui.toml"
}
}
printInfoF("Loading config from toml: $TEXT", messageAttachmentColor.stylize(configFile))
config, err := toml.LoadFile(configFile)
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
}
if config.Has("Emoji.unicodeSupport") {
UNICODE_EMOJI_SUPPORT = config.Get("Emoji.unicodeSupport").(bool)
}
colorless = config.GetDefault("Basics.colorless", false).(bool)
if config.Has("Basics.colorless") {
colorless = config.Get("Basics.colorless").(bool)

Loading…
Cancel
Save