lines

package
v0.0.0-...-d7fb6e2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LineTitle       = "title"
	LineDashes      = "dashes"
	LineBlank       = "blank"
	LineColorbar    = "colorbar"
	LineOS          = "os"
	LineHost        = "host"
	LineKernel      = "kernel"
	LineUptime      = "uptime"
	LineMotherboard = "motherboard"
	LineBios        = "bios"
	LinePkgs        = "pkgs"
	LineShell       = "shell"
	LineResolution  = "resolution"
	LineTerminal    = "terminal"
	LineTheme       = "theme"
	LineCPU         = "cpu"
	LineGPU         = "gpu"
	LineUsage       = "cpu_usage"
	LineMemory      = "memory"
	LineSwap        = "swap"
	LineDisk        = "disk"
	LineBattery     = "battery"
	LineLocale      = "locale"
	LineWeather     = "weather"
	LineLocalIP     = "local_ip"
	LinePublicIP    = "public_ip"
)

Variables

View Source
var DefaultTitleMap = map[string]string{
	LineOS:          "OS",
	LineHost:        "Host",
	LineKernel:      "Kernel",
	LineMotherboard: "Motherboard",
	LineBios:        "Bios",
	LineUptime:      "Uptime",
	LinePkgs:        "Packages",
	LineShell:       "Shell",
	LineResolution:  "Resolution",
	LineTerminal:    "Terminal",
	LineTheme:       "Theme",
	LineCPU:         "CPU",
	LineGPU:         "GPU",
	LineUsage:       "CPU Usage",
	LineMemory:      "Memory",
	LineSwap:        "Swap",
	LineBattery:     "Battery",
	LineLocale:      "Locale",
	LineWeather:     "Weather",
	LineLocalIP:     "Local IP",
	LinePublicIP:    "Public IP",
}

Functions

func Battery

func Battery(config LineConfig) (string, error)

func Bios

func Bios(config LineConfig) (string, error)

func CPU

func CPU(config LineConfig) (string, error)

func Colorbar

func Colorbar() []string

func Dashes

func Dashes() string

func Disk

func Disk(config LineConfig) (title []string, content []string, err error)

Disk info is an exception to the rule and uses a different return type as it is handled manually so it can render multiple lines

func GPU

func GPU(config LineConfig) (string, error)

func Kernel

func Kernel(config LineConfig) (string, error)

func LocalIP

func LocalIP(config LineConfig) (string, error)

func Locale

func Locale(config LineConfig) (string, error)

func Memory

func Memory(config LineConfig) (string, error)

func Model

func Model(config LineConfig) (string, error)

func Motherboard

func Motherboard(config LineConfig) (string, error)

func OS

func OS(config LineConfig) (string, error)

func Pkgs

func Pkgs(config LineConfig) (string, error)

func PublicIP

func PublicIP(config LineConfig) (string, error)

func RenderLines

func RenderLines(offset int, lines []interface{}, logo []string) int

func Resolution

func Resolution(config LineConfig) (string, error)

func Shell

func Shell(config LineConfig) (string, error)

func Swap

func Swap(config LineConfig) (string, error)

func Terminal

func Terminal(config LineConfig) (string, error)

func Theme

func Theme(config LineConfig) (string, error)

func Title

func Title() string

func Uptime

func Uptime(config LineConfig) (string, error)

func Usage

func Usage(config LineConfig) (string, error)

func Weather

func Weather(config LineConfig) (string, error)

Types

type LineConfig

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

func GetLineConfig

func GetLineConfig(entry interface{}) (string, LineConfig)

func (LineConfig) Get

func (c LineConfig) Get(key string) interface{}

func (LineConfig) GetBool

func (c LineConfig) GetBool(key string) bool

func (LineConfig) GetString

func (c LineConfig) GetString(key string) string

func (LineConfig) GetStringSlice

func (c LineConfig) GetStringSlice(key string) []string

func (LineConfig) Has

func (c LineConfig) Has(key string) bool

Jump to

Keyboard shortcuts

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