From 3156d481feaffd2e6df6d860b980e9160b706e42 Mon Sep 17 00:00:00 2001 From: Jeffas Date: Sat, 7 Mar 2020 16:42:41 +0000 Subject: Add pinned tabs This adds the commands pin-tab and unpin-tab. Once pinned a tab lives on the left of the tabstrip and has a configurable marker, defaulting to ` before its name. --- widgets/aerc.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'widgets') diff --git a/widgets/aerc.go b/widgets/aerc.go index b7071e1..4c8d09d 100644 --- a/widgets/aerc.go +++ b/widgets/aerc.go @@ -43,7 +43,7 @@ func NewAerc(conf *config.AercConfig, logger *log.Logger, cmd func(cmd []string) error, complete func(cmd string) []string, cmdHistory lib.History) *Aerc { - tabs := ui.NewTabs() + tabs := ui.NewTabs(&conf.Ui) statusbar := ui.NewStack() statusline := NewStatusLine() @@ -321,6 +321,14 @@ func (aerc *Aerc) MoveTab(i int) { aerc.tabs.MoveTab(i) } +func (aerc *Aerc) PinTab() { + aerc.tabs.PinTab() +} + +func (aerc *Aerc) UnpinTab() { + aerc.tabs.UnpinTab() +} + func (aerc *Aerc) NextTab() { aerc.tabs.NextTab() } -- cgit 1.4.1-2-gfad0