Navid Yaghoobi 4ed652a547 typo fix
2021-12-23 19:32:06 +11:00
2021-12-22 14:47:48 +11:00
2021-12-19 15:06:48 +11:00
2021-12-21 18:13:01 +11:00
2021-12-21 22:39:33 +11:00
2021-12-22 14:47:48 +11:00
2021-12-22 14:47:48 +11:00
2021-12-22 14:47:48 +11:00
2021-12-21 18:13:01 +11:00
2021-12-19 18:39:14 +11:00
2021-12-19 15:06:48 +11:00
2021-12-22 14:45:50 +11:00
2021-12-23 19:32:06 +11:00
2021-12-21 19:57:34 +11:00

tvxwidgets

PkgGoDev Go Report

tvxwidgets provides extra widgets for tview.
NOTE: The project is at its early stages and under development, feel free to contribute and report bugs.

Screenshot

Example

package main

import (
	"time"

	"github.com/gdamore/tcell/v2"
	"github.com/navidys/tvxwidgets"
	"github.com/rivo/tview"
)

func main() {
	app := tview.NewApplication()
	gauge := tvxwidgets.NewActivityModeGauge()
	gauge.SetTitle("activity mode gauge")
	gauge.SetPgBgColor(tcell.ColorOrange)
	gauge.SetRect(10, 4, 50, 3)
	gauge.SetBorder(true)

	update := func() {
		tick := time.NewTicker(500 * time.Millisecond)
		for {
			select {
			case <-tick.C:
				gauge.Pulse()
				app.Draw()
			}
		}
	}
	go update()

	if err := app.SetRoot(gauge, false).EnableMouse(true).Run(); err != nil {
		panic(err)
	}
}

Widgets

  • bar chart
  • activity mode gauge
  • percentage mode gauge
  • utilisation mode gauge

under development:

  • message dialog (information, warning, critical)
  • input dialog
  • context menu
  • ...
Description
tvxwidgets provides extra widgets for tview
Readme MIT 1.3 MiB
Languages
Go 93.8%
Makefile 5.1%
Shell 1.1%