summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
authordelthas <delthas@dille.cc>2022-04-29 17:45:32 +0200
committerdelthas <delthas@dille.cc>2022-04-29 17:45:32 +0200
commit859b8fdb7d433a848668c6f1a00406f107fe00e5 (patch)
treef1e9dc042af2609b4988c6a0522df61526d07a2b /config.go
parentmake install an independant task in Makefile (diff)
Enable specifying the size of disabled channel & member columns
Diffstat (limited to 'config.go')
-rw-r--r--config.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/config.go b/config.go
index 30a1efd..5ac2a8a 100644
--- a/config.go
+++ b/config.go
@@ -216,8 +216,11 @@ func unmarshal(filename string, cfg *Config) (err error) {
if err != nil {
return err
}
- if channels == 0 {
+ if channels <= 0 {
cfg.ChanColEnabled = false
+ if channels < 0 {
+ cfg.ChanColWidth = -channels
+ }
} else {
cfg.ChanColWidth = channels
}
@@ -230,8 +233,11 @@ func unmarshal(filename string, cfg *Config) (err error) {
if err != nil {
return err
}
- if members == 0 {
+ if members <= 0 {
cfg.MemberColEnabled = false
+ if members < 0 {
+ cfg.MemberColWidth = -members
+ }
} else {
cfg.MemberColWidth = members
}