Push commands to the status stack
This commit is contained in:
parent
cab3771e17
commit
30c85dd4ab
1 changed files with 3 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
||||||
package widgets
|
package widgets
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -45,14 +46,12 @@ func NewAerc(logger *log.Logger) *Aerc {
|
||||||
grid.AddChild(statusbar).At(2, 1)
|
grid.AddChild(statusbar).At(2, 1)
|
||||||
|
|
||||||
statusline := NewStatusLine()
|
statusline := NewStatusLine()
|
||||||
statusline.Push("test status!", 6 * time.Second)
|
|
||||||
statusline.Push("test error!", 3 * time.Second).
|
|
||||||
Color(tb.ColorRed, tb.ColorBlack)
|
|
||||||
statusbar.Push(statusline)
|
statusbar.Push(statusline)
|
||||||
|
|
||||||
exline := NewExLine(func(command string) {
|
exline := NewExLine(func(command string) {
|
||||||
|
statusline.Push(fmt.Sprintf("TODO: execute %s", command),
|
||||||
|
3 * time.Second)
|
||||||
statusbar.Pop()
|
statusbar.Pop()
|
||||||
logger.Printf("TODO: execute command: %s\n", command)
|
|
||||||
}, func() {
|
}, func() {
|
||||||
statusbar.Pop()
|
statusbar.Pop()
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue