-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
41 lines (35 loc) · 964 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package main
import (
"fmt"
"os"
"github.com/bbfh-dev/ttk/display"
"github.com/bbfh-dev/ttk/scene"
"github.com/bbfh-dev/ttk/ttk"
"golang.org/x/crypto/ssh/terminal"
)
const FIGLET = ` _____ _____ _ __
|_ _|_ _| |/ /
| | | | | ' <
|_| |_| |_|\_\`
func main() {
scene := scene.TtkWindow{
Widgets: []ttk.Widget{
&display.TtkArt{Content: FIGLET},
&display.TtkLabel{
Label: "Hello World! And other species! What a wonderful long text about Fooga that is so based and fat and based, did I mention based? Anyway. Fooga. Yes, Fooga is incredible. It's so round and... fooga. Really, no other explanation.",
Justify: 0,
Width: display.AUTO,
MaxWidth: display.AUTO,
},
},
}
scene.Init()
var err error
ttk.Width, ttk.Height, err = terminal.GetSize(int(os.Stdin.Fd()))
ttk.Height -= 4 // My hardcoded prompt height™ + command
if err != nil {
fmt.Println(err)
os.Exit(1)
}
fmt.Println(scene.Scene())
}