icons

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package icons implements logic of receiving icons for filetypes.

Code generated by gomplate; DO NOT EDIT. This file generated by gomplate at Sat, 21 Sep 2019 06:41:04 UTC using data from datafiles/nerd.json

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringFonts

func StringFonts() []string

StringFonts returns list of string representations of supported fonts

Types

type Font

type Font interface {
	fmt.Stringer
	GetIcon(filename string) Icon
	DefaultIcon() Icon
	DirIcon() Icon
}

Font interface represents abstract font

func Fonts

func Fonts() []Font

Fonts returns list of supported fonts

func GetFontByName

func GetFontByName(name string) Font

GetFontByName returns font by it string representation

type Icon

type Icon struct {
	Symbol string
	Color  uint8
}

Icon represents icon struct

func (Icon) Colored

func (icon Icon) Colored() aurora.Value

Colored returns colorful ANSI representation of icon

func (Icon) IsEmpty

func (icon Icon) IsEmpty() bool

IsEmpty checks if icon is empty

func (Icon) String

func (icon Icon) String() string

String returns string representation of icon

type NerdFont

type NerdFont struct{}

Nerd represents nerd font

func (NerdFont) DefaultIcon

func (NerdFont) DefaultIcon() Icon

DefaultIcon returns default icon

func (NerdFont) DirIcon

func (NerdFont) DirIcon() Icon

DirIcon returns directory icon

func (NerdFont) GetIcon

func (NerdFont) GetIcon(filename string) Icon

GetIcon returns icon by filetype It returns empty icon if not matches found

func (NerdFont) String

func (NerdFont) String() string

String returns string representation of font

Jump to

Keyboard shortcuts

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