~taiite/senpai

328a23e10f35bea78df63fe46041d581d89fe79d — Hubert Hirtz 2 months ago 526eb96
Don't show the member list by default
3 files changed, 7 insertions(+), 4 deletions(-)

M config.go
M doc/senpai.5.scd
M ui/ui.go
M config.go => config.go +2 -2
@@ 94,8 94,8 @@ func ParseConfig(buf []byte) (cfg Config, err error) {
	if cfg.ChanColWidth < 0 {
		cfg.ChanColWidth = 0
	}
	if cfg.MemberColWidth <= 0 {
		cfg.MemberColWidth = 16
	if cfg.MemberColWidth < 0 {
		cfg.MemberColWidth = 0
	}
	return
}

M doc/senpai.5.scd => doc/senpai.5.scd +2 -1
@@ 80,7 80,8 @@ on-highlight: |
	cells.  By default, the channel list is horizontal.

*member-column-width*
	The number of cells that the column for members occupies.  By default, 16.
	Show the list of channel members on the right of the screen, with a width
	equals to the given amount of cells.

*no-tls*
	Disable TLS encryption.  Defaults to false.

M ui/ui.go => ui/ui.go +3 -1
@@ 299,7 299,9 @@ func (ui *UI) Draw(members []irc.Member) {
	} else {
		ui.bs.DrawVerticalBufferList(ui.screen, 0, 0, ui.config.ChanColWidth, h)
	}
	ui.bs.DrawVerticalMemberList(ui.screen, w-ui.config.MemberColWidth, 0, ui.config.MemberColWidth, h, members, &ui.memberOffset)
	if ui.config.MemberColWidth != 0 {
		ui.bs.DrawVerticalMemberList(ui.screen, w-ui.config.MemberColWidth, 0, ui.config.MemberColWidth, h, members, &ui.memberOffset)
	}
	if ui.config.ChanColWidth == 0 {
		ui.drawStatusBar(ui.config.ChanColWidth, h-3, w-ui.config.MemberColWidth)
	} else {