From 859b8fdb7d433a848668c6f1a00406f107fe00e5 Mon Sep 17 00:00:00 2001 From: delthas Date: Fri, 29 Apr 2022 17:45:32 +0200 Subject: Enable specifying the size of disabled channel & member columns --- config.go | 10 ++++++++-- doc/senpai.5.scd | 4 ++++ 2 files changed, 12 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 } diff --git a/doc/senpai.5.scd b/doc/senpai.5.scd index 0376019..ec6bea5 100644 --- a/doc/senpai.5.scd +++ b/doc/senpai.5.scd @@ -116,10 +116,14 @@ pane-widths { *channels* The number of cells that the column for channels occupies on screen. By default, 16. Use special value 0 to make the channel list horizontal. + If the value is negative, the channel list will be horizontal by default + and will take the positive (opposite) width value when toggled with F7. *members* The number of cells that that the column for the list of channel members occupies on screen. By default, 16. Use special value 0 to disable. + If the value is negative, the member list will be disabled by default + and will take the positive (opposite) width value when toggled with F8. *tls* Enable TLS encryption. Defaults to true. -- cgit v1.2.3