Tooey is a cross-platform and customizable terminal dashboard and widget library built on top of tcell (formerly termbox-go pre-fork). This project started as a fork of the fantastic termui but then turned into a ground-up rewrite.
See FORK.MD for details of the original fork and README.md
- 24bit colors enabled by TCell
- Requires your $TERM to end in
-truecolor
Tcell Docs - Falls back to 256 color otherwise
- Requires your $TERM to end in
- Flex-inspired layout engine with
Container
- Several premade widgets for common use cases
- Easily create custom widgets by extending
Element
- Position widgets either in containers with flex-like layout or with absolute coordinates
- Keyboard, mouse, and terminal resizing events < UNDER REWORK >
- Colors, Styling, Theming < UNDER REWORK >
go mod init
go get github.com/asciifaceman/tooey
go mod tidy
after first reference
package main
import (
"log"
"github.com/asciifaceman/tooey"
"github.com/asciifaceman/tooey/widgets"
)
func main() {
if err := tooey.Init(); err != nil {
log.Fatalf("failed to initialize tooey: %v", err)
}
defer tooey.Close()
p := widgets.NewText()
p.SetTheme(themes.ThemeRetroTerminalOrange)
p.Title.Content = "Text Title"
p.Content = "Hello World!"
p.SetRect(0, 0, 25, 5)
tooey.Render(p)
time.Sleep(time.Duration(time.Second * 5)) // events returning soon
}
Run an example with go run _examples/{example}.go
or run each example consecutively with make run-examples
.
- (Originally) Gizak
- Charles (asciifaceman) Corbett
- Extended Authors