summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
authorHubert Hirtz <hubert@hirtzfr.eu>2020-08-16 17:34:28 +0200
committerHubert Hirtz <hubert@hirtzfr.eu>2020-08-16 17:34:28 +0200
commit34e3264e22ba0524b124f4d350f154e276a7fee8 (patch)
treeebe755ad9c30eab81c82341f6f20e69e817d7d3d /config.go
parentFix +typing=active being sent incorrectly (diff)
ui: Configurable nick column width
Diffstat (limited to 'config.go')
-rw-r--r--config.go17
1 files changed, 11 insertions, 6 deletions
diff --git a/config.go b/config.go
index 216655a..09f4b39 100644
--- a/config.go
+++ b/config.go
@@ -7,18 +7,23 @@ import (
)
type Config struct {
- Addr string
- Nick string
- Real string
- User string
- Password *string
- Highlights []string
+ Addr string
+ Nick string
+ Real string
+ User string
+ Password *string
+
+ Highlights []string
+ NickColWidth int `yaml:"nick-column-width"`
Debug bool
}
func ParseConfig(buf []byte) (cfg Config, err error) {
err = yaml.Unmarshal(buf, &cfg)
+ if cfg.NickColWidth <= 0 {
+ cfg.NickColWidth = 16
+ }
return
}