tui

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DATE_FORMAT = "2 Jan 06 3:04pm"
)

Variables

View Source
var (
	SUBTLE     = lipgloss.AdaptiveColor{Light: "#D9DCCF", Dark: "#383838"}
	ORANGE     = lipgloss.AdaptiveColor{Light: "#FF5F00", Dark: "#FFAF00"}
	DEFAULT_FG = lipgloss.AdaptiveColor{Light: "#000000", Dark: "#FFFFFF"}
)

Functions

func Bold added in v1.1.0

func Bold(text string) string

func PrintArrivingScreen

func PrintArrivingScreen(client api.Api, destinationLookup *map[string][]api.Predictions, sortedDestinations []string)

Create and print a screen that resembles a station's. Will display an arriving train's line, destination and arriving trains (in "minutes-away")

func PrintIssues added in v1.2.0

func PrintIssues(client api.Api, incidents []api.Incident)

Types

type Buffer added in v1.1.0

type Buffer struct {
	// contains filtered or unexported fields
}

An alternate buffer drawn on top of active terminal screen

func NewBuffer added in v1.1.0

func NewBuffer() *Buffer

func (*Buffer) RefreshScreen added in v1.1.0

func (b *Buffer) RefreshScreen()

func (*Buffer) StartAlternateBuffer added in v1.1.0

func (b *Buffer) StartAlternateBuffer()

func (*Buffer) StopAlternateBuffer added in v1.1.0

func (b *Buffer) StopAlternateBuffer()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL