summary refs log tree commit diff stats
path: root/cmd
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-02-27 21:02:56 -0500
committerDrew DeVault <sir@cmpwn.com>2018-02-27 21:02:56 -0500
commita073d7613fac7c79b7909d93a0dd7bfea05d5c9d (patch)
tree32a7f15b637e56a5df0b2e59715f0e4e9f786c00 /cmd
parent46756487fb56acf26122a7b5d46be2ff8ee3c051 (diff)
downloadaerc-a073d7613fac7c79b7909d93a0dd7bfea05d5c9d.tar.gz
Add statusline widget
Diffstat (limited to 'cmd')
-rw-r--r--cmd/aerc/main.go16
1 files changed, 14 insertions, 2 deletions
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)