mirror of
https://github.com/Rudi9719/kbtui.git
synced 2026-03-22 02:57:23 +00:00
added emoji config file support
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user