aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/aerc/main.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/cmd/aerc/main.go b/cmd/aerc/main.go
index 1d11c5d1..7a273b8f 100644
--- a/cmd/aerc/main.go
+++ b/cmd/aerc/main.go
@@ -48,9 +48,13 @@ func main() {
panic(err)
}
+ tabs := ui.NewTabs()
+ tabs.Add(fill('★'), "白い星")
+ tabs.Add(fill('☆'), "empty stars")
+
grid := ui.NewGrid()
grid.Rows = []ui.DimSpec{
- ui.DimSpec{ui.SIZE_EXACT, 4},
+ ui.DimSpec{ui.SIZE_EXACT, 1},
ui.DimSpec{ui.SIZE_WEIGHT, 1},
ui.DimSpec{ui.SIZE_WEIGHT, 1},
ui.DimSpec{ui.SIZE_EXACT, 1},
@@ -59,8 +63,8 @@ func main() {
ui.DimSpec{ui.SIZE_WEIGHT, 3},
ui.DimSpec{ui.SIZE_WEIGHT, 2},
}
- grid.AddChild(fill('★')).At(0, 0).Span(1, 2)
- grid.AddChild(fill('☆')).At(1, 0).Span(1, 2)
+ grid.AddChild(tabs.TabStrip).At(0, 0).Span(1, 2)
+ grid.AddChild(tabs.TabContent).At(1, 0).Span(1, 2)
grid.AddChild(fill('.')).At(2, 0).Span(1, 2)
grid.AddChild(fill('•')).At(2, 1).Span(1, 1)
grid.AddChild(fill('+')).At(3, 0).Span(1, 2)
@@ -71,6 +75,11 @@ func main() {
}
defer _ui.Close()
+ go (func() {
+ time.Sleep(1 * time.Second)
+ tabs.Select(1)
+ })()
+
for !_ui.Exit {
if !_ui.Tick() {
time.Sleep(100 * time.Millisecond)