From a073d7613fac7c79b7909d93a0dd7bfea05d5c9d Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Tue, 27 Feb 2018 21:02:56 -0500 Subject: Add statusline widget --- cmd/aerc/main.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'cmd') diff --git a/cmd/aerc/main.go b/cmd/aerc/main.go index 5e537fb..009b5eb 100644 --- a/cmd/aerc/main.go +++ b/cmd/aerc/main.go @@ -73,10 +73,22 @@ func main() { grid.AddChild(tabs.TabContent).At(1, 1) statusbar := libui.NewStack() - exline := widgets.NewExLine() - statusbar.Push(exline) grid.AddChild(statusbar).At(2, 1) + statusline := widgets.NewStatusLine() + statusline.Push("test status!", 6*time.Second) + statusline.Push("test error!", 3*time.Second). + Color(tb.ColorRed, tb.ColorBlack) + statusbar.Push(statusline) + + exline := widgets.NewExLine(func(command string) { + statusbar.Pop() + logger.Printf("TODO: execute command: %s\n", command) + }, func() { + statusbar.Pop() + }) + statusbar.Push(exline) + ui, err := libui.Initialize(conf, grid) if err != nil { panic(err) -- cgit v1.2.3