Golang terminal dashboard
Go to file
Caleb Bassi ed219e8c05 Update readme and examples
Moved the PollEvents call outside of the for loop
2018-11-29 15:42:04 -08:00
_examples Update readme and examples 2018-11-29 15:42:04 -08:00
scripts Misc 2018-11-28 21:50:10 -08:00
test Refactor debug and test folders 2018-11-29 09:19:22 -08:00
.gitignore
.travis.yml
barchart.go
block_common.go
block_test.go
block_windows.go
block.go
buffer_test.go
buffer.go
canvas_test.go Misc 2018-11-28 21:50:10 -08:00
canvas.go
CHANGELOG.md Fix and rename PollEvents 2018-11-29 15:19:07 -08:00
doc.go Update godoc 2018-11-28 20:38:11 -08:00
events_test.go
events.go Fix and rename PollEvents 2018-11-29 15:19:07 -08:00
gauge.go
go.mod
go.sum
grid_test.go
grid.go
helper_test.go
helper.go
LICENSE
linechart_others.go
linechart_windows.go
linechart.go
list.go
par_test.go
paragraph.go Rename Par to Paragraph 2018-11-28 18:25:38 -08:00
piechart.go
pos_test.go
pos.go
README.md Update readme and examples 2018-11-29 15:42:04 -08:00
render.go Rework events (again) 2018-11-28 18:19:34 -08:00
sparkline.go
stackedbarchart.go Rename mbarchart to stackedbarchart 2018-11-28 18:50:44 -08:00
table.go
tabpane.go Refactor tabpane 2018-11-29 09:41:29 -08:00
textbuilder_test.go
textbuilder.go
theme_test.go
theme.go
widget.go

termui

Build Status Doc Status

demo cast under osx 10.10; Terminal.app; Menlo Regular 12pt.)

termui is a cross-platform, easy-to-compile, and fully-customizable terminal dashboard built on top of termbox-go. It is inspired by blessed-contrib and written purely in Go.

termui is currently undergoing some API changes so make sure to check the changelog when upgrading

Installation

Installing from the master branch is recommended:

go get -u github.com/gizak/termui@master

Usage

Hello World

package main

import ui "github.com/gizak/termui"

func main() {
	err := ui.Init()
	if err != nil {
		panic(err)
	}
	defer ui.Close()

	p := ui.NewParagraph("Hello World!")
	p.Width = 25
	p.Height = 5
	ui.Render(p)

	uiEvents := ui.PollEvents()
	for {
		e := <-uiEvents
		if e.Type == ui.KeyboardEvent {
			return
		}
	}
}

Widgets

Click image to see the corresponding demo codes.

barchart gauge linechart list paragraph sparklines stackedbarchart table

Examples

Examples can be found in _examples. Run with go run _examples/... or run all of them consecutively with ./scripts/run_examples.py.

Documentation

  • godoc for code documentation
  • wiki for general information

Uses

License

This library is under the MIT License