summaryrefslogtreecommitdiff
path: root/widgets/aerc.go
diff options
context:
space:
mode:
authorJeffas <dev@jeffas.io>2020-03-07 16:42:41 +0000
committerDrew DeVault <sir@cmpwn.com>2020-03-09 09:31:02 -0400
commit3156d481feaffd2e6df6d860b980e9160b706e42 (patch)
tree82a6362a76015273a7a43105e15e7cdb41f96ada /widgets/aerc.go
parent258a3f11ae379b96f4743d6d709b7c42bafd6dbc (diff)
downloadaerc-3156d481feaffd2e6df6d860b980e9160b706e42.zip
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.
Diffstat (limited to 'widgets/aerc.go')
-rw-r--r--widgets/aerc.go10
1 files changed, 9 insertions, 1 deletions
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()
}