style

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Title  = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("4"))
	Accent = lipgloss.NewStyle().Foreground(lipgloss.Color("6"))
	Strong = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("6"))
	Name   = lipgloss.NewStyle().Bold(true)
	Dim    = lipgloss.NewStyle().Foreground(lipgloss.Color("8"))
	Err    = lipgloss.NewStyle().Foreground(red)

	Alive   = lipgloss.NewStyle().Foreground(green)
	Dead    = lipgloss.NewStyle().Foreground(red)
	Pending = lipgloss.NewStyle().Foreground(yellow)
	Unknown = lipgloss.NewStyle().Foreground(gray)
)

Functions

func Bar

func Bar(fraction float64) string

func Bytes

func Bytes(b int64) string

func Clip

func Clip(s string, width int) string

func Expiry

func Expiry(t time.Time) string

func FirstLine

func FirstLine(s string) string

func Fit

func Fit(body string, n int) string

func Flush

func Flush(left, right string, width int) string

Flush right-aligns right, at least two spaces apart

func Indent

func Indent(s string) string

func Pad

func Pad(s string, w int) string

func Sanitize

func Sanitize(s string, emoji bool) string

func Segment

func Segment(s string, active bool) string

Segment is one tab, same width either way

func Since

func Since(t time.Time) string

func Uptime

func Uptime(d time.Duration) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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