widgets

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlignContent

func AlignContent(output WidgetResponse) string

func Border

func Border(contents []string, borderStyle lipgloss.Style) string

TODO display widget name in top border

func BorderGradient

func BorderGradient(contents []string, grad colorgrad.Gradient) string

TODO display widget name in top border

func Formatter

func Formatter(fg, bg string, bold bool) func(string) string

func GetWidgetWidth

func GetWidgetWidth() int

func PBar

func PBar(percentage float64, width int, bar, space string) string

func PBarColor

func PBarColor(percentage float64, width int, bar, space string, activeColor, inactiveColor string) string

func PBarGradient

func PBarGradient(percentage float64, width int, activeGrad, inactiveGrad colorgrad.Gradient, ltext, rtext string) string

Types

type BorderChars

type BorderChars struct {
	Vertical      string
	Horizontal    string
	TopLeft       string
	TopRight      string
	BottomLeft    string
	BottomRight   string
	VerticalLeft  string
	VerticalRight string
}

type WidgetFn

type WidgetFn func(*viper.Viper, formatFn) (WidgetResponse, error)

type WidgetResponse

type WidgetResponse struct {
	Name    string
	Content string
	Place   string
}

func BannerWidget

func BannerWidget(v *viper.Viper, f formatFn) (WidgetResponse, error)

BannerWidget is a widget that displays the host banner

func DiskWidget

func DiskWidget(v *viper.Viper, f formatFn) (WidgetResponse, error)

***

  • DiskWidget is a widget that displays partition usage statistics
  • Configuration options:
  • - disk.partitions: list of disks to display [optional]

func DockerWidget

func DockerWidget(v *viper.Viper, f formatFn) (WidgetResponse, error)

func NaptarWidget

func NaptarWidget(v *viper.Viper, f formatFn) (WidgetResponse, error)

NaptarWidget is a widget that displays calendar information

func NetworkWidget

func NetworkWidget(v *viper.Viper, f formatFn) (WidgetResponse, error)

func SysinfoWidget

func SysinfoWidget(v *viper.Viper, f formatFn) (WidgetResponse, error)

SysinfoWidget is a widget that displays the host banner

func SystemdWidget

func SystemdWidget(v *viper.Viper, f formatFn) (WidgetResponse, error)

Jump to

Keyboard shortcuts

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