archey

package
v0.0.0-...-f535d6c Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidMemUnit = func(u string) error {
		return fmt.Errorf("invalid memory unit '%s'", u)
	}
	ErrInvalidSwapUnit = func(u string) error {
		return fmt.Errorf("invalid swap unit '%s'", u)
	}
	ErrInvalidDiskUnit = func(u string) error {
		return fmt.Errorf("invalid disk unit '%s'", u)
	}
)
View Source
var ErrFileEmpty = func(f string) error {
	return fmt.Errorf("file '%s' is empty", f)
}

Functions

func GetDE

func GetDE() string

GetDE returns the Desktop Environment name

func GetWM

func GetWM() string

GetWM returns Window Manager name

func ListColors

func ListColors()

func NoColor

func NoColor()

Types

type Colors

type Colors struct {
	Name string
	Text string
	Sep  string
	Body []string
}

type GTK

type GTK struct {
	Theme  string
	Icons  string
	Font   string
	Cursor string
}

func GetGTKInfo

func GetGTKInfo(f string) (GTK, error)

GetGTKInfo reads gtkrc and returns a GTK type containing theme name, icon theme name, font name and cursor theme name

type Options

type Options struct {
	Sep           string
	DiskUnit      string
	MemoryUnit    string
	SwapUnit      string
	Paths         []string
	PathFull      bool
	ShellFull     bool
	UpSinceFormat string
	Show          Show
	Colors        Colors
}

func New

func New() *Options

func (*Options) Render

func (o *Options) Render() (string, error)

Render returns the rendered logo with all the information added based on the specified options

type Show

type Show struct {
	OS              bool
	Arch            bool
	Kernel          bool
	User            bool
	Hostname        bool
	Uptime          bool
	UpSince         bool
	WM              bool
	DE              bool
	GTK2Theme       bool
	GTK2IconTheme   bool
	GTK2Font        bool
	GTK2CursorTheme bool
	GTK3Theme       bool
	GTK3IconTheme   bool
	GTK3Font        bool
	GTK3CursorTheme bool
	Terminal        bool
	Shell           bool
	Editor          bool
	Packages        bool
	Memory          bool
	Swap            bool
	CPU             bool
	Root            bool
	Home            bool
}

Jump to

Keyboard shortcuts

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