theme

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultASCII = `
    ╭─────────╮
    │  ◠ ◡ ◠  │
    │         │
    ╰─────────╯`

	ArchASCII = `
       /\
      /  \
     /\   \
    /      \
   /   ,,   \
  /   |  |  -\
 /_-''    ''-_\`

	UbuntuASCII = `
         _
     ---(_)
 _/  ---  \
(_) |   |
  \  --- _/
     ---(_)`

	DebianASCII = `
   _____
  /  __ \
 |  /    |
 |  \___-
 -_
   --_`

	FedoraASCII = `
       _____
      /   __)\\
      |  /  \\ \\
   ___|  |__/ /
  / (_    _)_/
 / /  |  |
 \ \__/  |
  \(_____/`

	MintASCII = `
  ___________
 |_          \\
   | | | | | |
   | | | | | |
   |_|_|_|_|_|`

	ManjaroASCII = `` /* 276-byte string literal not displayed */

	PopOSASCII = `` /* 145-byte string literal not displayed */

	GentooASCII = `
  _-----_
 (       \\
 \\    0   \\
  \\        )
  /      _/
 (     _-
 \\____-`

	OpenSUSEASCII = `
    _______
____/   ___/_
     / / / /
    / /_/ /
   /____/`

	KaliASCII = `` /* 170-byte string literal not displayed */

	VoidASCII = `
      _______
     /  _ \  \\
    | (..) |  |
     \\____/  /
      '----'`

	NixOSASCII = `
   \\\\  \\\\ //
  ==\\\\__\\\\/ //
    //   \\\\//
 ==//     //==
  //\\\\___//
 // /\\\\  \\\\==
   // \\\\  \\\\`

	MacOSASCII = `
       .:'
    __ :'__
 .'    '   '.
:           :
:           :
 :         :
  '.____.'`

	WindowsASCII = `` /* 417-byte string literal not displayed */

	FreeBSDASCII = `
 /\\,-'''''-,/\\
 \\_)       (_/
 |           |
 |           |
  ;         ;
   '-_____-'`

	AlpineASCII = `
    /\\ /\\
   /  \\  \\
  /    \\  \\
 /      \\  \\
/__      \\__\\`
)

ASCII art for various operating systems and distributions

Variables

This section is empty.

Functions

func DetectOS

func DetectOS() string

DetectOS attempts to detect the operating system and distribution (cached)

func GetASCIIArt

func GetASCIIArt(osName string) string

GetASCIIArt returns ASCII art for the detected or specified OS

Types

type Colors

type Colors struct {
	Primary    string `json:"primary"`
	Secondary  string `json:"secondary"`
	Accent     string `json:"accent"`
	Label      string `json:"label"`
	Value      string `json:"value"`
	Border     string `json:"border"`
	Background string `json:"background"`
}

type Layout

type Layout struct {
	ShowASCII   bool   `json:"show_ascii"`
	ASCIIWidth  int    `json:"ascii_width"`
	Separator   string `json:"separator"`
	Padding     int    `json:"padding"`
	BorderStyle string `json:"border_style"`
}

type Styles

type Styles struct {
	Label     lipgloss.Style
	Value     lipgloss.Style
	Separator lipgloss.Style
	ASCII     lipgloss.Style
	Border    lipgloss.Style
	Container lipgloss.Style
}

Styles contains lipgloss styles for the theme

type Theme

type Theme struct {
	Name   string `json:"name"`
	Colors Colors `json:"colors"`
	ASCII  string `json:"ascii"`
	Layout Layout `json:"layout"`
}

func Load

func Load(name string) (*Theme, error)

Load loads a theme by name from the themes directory

func (*Theme) GetStyles

func (t *Theme) GetStyles() Styles

GetStyles creates lipgloss styles from the theme

Jump to

Keyboard shortcuts

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