icon

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Space         = " "
	SuperfileIcon = "\ue6ad" // Printable Rune : ""

	// Well Known Directories
	Home        = "\U000f02dc" // Printable Rune : "󰋜"
	Download    = "\U000f03d4" // Printable Rune : "󰏔"
	Documents   = "\U000f0219" // Printable Rune : "󰈙"
	Pictures    = "\U000f02e9" // Printable Rune : "󰋩"
	Videos      = "\U000f0381" // Printable Rune : "󰎁"
	Music       = "♬"          // Printable Rune : "♬"
	Templates   = "\U000f03e2" // Printable Rune : "󰏢"
	PublicShare = "\uf0ac"     // Printable Rune : ""

	// file operations
	CompressFile = "\U000f05c4" // Printable Rune : "󰗄"
	ExtractFile  = "\U000f06eb" // Printable Rune : "󰛫"
	Copy         = "\U000f018f" // Printable Rune : "󰆏"
	Cut          = "\U000f0190" // Printable Rune : "󰆐"
	Delete       = "\U000f01b4" // Printable Rune : "󰆴"

	// other
	Cursor      = "\uf054"     // Printable Rune : ""
	Browser     = "\U000f0208" // Printable Rune : "󰈈"
	Select      = "\U000f01bd" // Printable Rune : "󰆽"
	Error       = "\uf530"     // Printable Rune : ""
	Warn        = "\uf071"     // Printable Rune : ""
	Done        = "\uf4a4"     // Printable Rune : ""
	InOperation = "\U000f0954" // Printable Rune : "󰥔"
	Directory   = "\uf07b"     // Printable Rune : ""
	Search      = "\ue68f"     // Printable Rune : ""
	SortAsc     = "\uf0de"     // Printable Rune : ""
	SortDesc    = "\uf0dd"     // Printable Rune : ""
	Terminal    = "\ue795"     // Printable Rune : ""
	Pinned      = "\U000f0403" // Printable Rune : "󰐃"
	Disk        = "\U000f11f0" // Printable Rune : "󱇰"

)
View Source
var Aliases = map[string]string{}/* 227 elements not displayed */
View Source
var Folders = map[string]Style{
	".atom":                 {Icon: "\ue764", Color: "#66595c"},
	".aws":                  {Icon: "\ue7ad", Color: "#ff9900"},
	".docker":               {Icon: "\ue7b0", Color: "#0db7ed"},
	".gem":                  {Icon: "\ue21e", Color: "#e9573f"},
	".git":                  {Icon: "\ue5fb", Color: "#f14e32"},
	".git-credential-cache": {Icon: "\ue5fb", Color: "#f14e32"},
	".github":               {Icon: "\ue5fd", Color: "#000000"},
	".npm":                  {Icon: "\ue5fa", Color: "#cb3837"},
	".nvm":                  {Icon: "\ue718", Color: "#cb3837"},
	".rvm":                  {Icon: "\ue21e", Color: "#e9573f"},
	".Trash":                {Icon: "\uf1f8", Color: "#7f8c8d"},
	".vscode":               {Icon: "\ue70c", Color: "#007acc"},
	".vim":                  {Icon: "\ue62b", Color: "#019833"},
	"config":                {Icon: "\ue5fc", Color: "#ffb86c"},

	"hidden":       {Icon: "\uf023", Color: "#75715e"},
	"node_modules": {Icon: "\ue5fa", Color: "#cb3837"},

	"superfile": {Icon: "\U000f069d", Color: "#FF6F00"},
}
View Source
var Icons = map[string]Style{}/* 111 elements not displayed */

Functions

func InitIcon

func InitIcon(nerdfont bool, directoryIconColor string)

InitIcon initializes the icon configuration for the application. It sets up different icons based on whether nerd fonts are enabled and configures directory icon colors.

Parameters:

  • nerdfont: boolean flag to determine if nerd fonts should be used When false, uses simple ASCII characters for icons When true, uses nerd font icons (default behavior)
  • directoryIconColor: string representing the color for directory icons If empty, defaults to "NONE" (dark yellowish)

The function configures various icons for:

  • System directories (Home, Download, Documents, etc.)
  • File operations (Compress, Extract, Copy, Cut, Delete)
  • UI elements (Cursor, Browser, Select, etc.)
  • Status indicators (Error, Warn, Done, InOperation)
  • Navigation and sorting (Directory, Search, SortAsc, SortDesc)

Types

type Style added in v1.3.0

type Style struct {
	Icon  string
	Color string
}

Style for icons

Jump to

Keyboard shortcuts

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