I'm not a huge fan of the default channel column width appearing here.
Also, this only allows for the default width to be set if the channel column starts expanded.
Perhaps the most versatile way to implement this would be to add a configuration option for whether this column starts expanded.
e.g. in config.go, the defaults would be written as
ChanColWidth: 16,
ChanColExpanded: false,
MemberColWidth: 16,
MemberColExpanded: false,
(This change would probably suggest refactoring the rest of the patch)
case tcell.KeyBacktab:
ok := app.win.InputAutoComplete(-1)
if ok {
diff --git a/doc/senpai.1.scd b/doc/senpai.1.scd
index 8ff0d18..6014b17 100644
--- a/doc/senpai.1.scd+++ b/doc/senpai.1.scd
@@ -107,6 +107,12 @@ of messages are in the timeline:
Trigger the auto-completion. Press several times to cycle through
completions.
+*CTRL-]*+ Show / hide the member list.++*CTRL-\\*+ Toggle the channel list (column vs row mode).+*CTRL-L*
Refresh the window.
diff --git a/ui/ui.go b/ui/ui.go
index 7e02812..492411d 100644
--- a/ui/ui.go+++ b/ui/ui.go
@@ -78,6 +78,10 @@ func New(config Config) (ui *UI, err error) {
return
}
+func (ui *UI) Config() *Config {+ return &ui.config+}+func (ui *UI) ShouldExit() bool {
return ui.exit.Load().(bool)
}
--
2.30.2
Thanks for the patch!
I had trouble applying it at first: maybe it wasn't based off of the latest master (or maybe due to master changing around the time you sent this patch in)?
After manually applying it, I found that it worked exactly as described. I really think this is an important feature for senpai to have.
Thanks for the patch!
I have modified it to my liking and merged it as
db5a4b730f72a66c60074a0854f64f05c1bf6c1d.
I set keys F7 & F8 in order to make them keyboard layout independent.