-
Notifications
You must be signed in to change notification settings - Fork 0
/
icons.go
128 lines (122 loc) Β· 5.27 KB
/
icons.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
package main
import "github.com/gookit/color"
// Icon is a set of icon and color.
type Icon struct {
Icon string
Color color.Color
}
var defaultFolderIcon = Icon{
Icon: "ξΏ",
Color: color.FgBlue,
}
var defaultFileIcon = Icon{
Icon: "ξ",
Color: color.FgWhite,
}
var icons = map[string]Icon{
"styl": {Icon: "ξ", Color: color.FgGreen},
"sass": {Icon: "ξ", Color: color.FgWhite},
"scss": {Icon: "ξ", Color: color.FgMagenta},
"htm": {Icon: "ξ", Color: color.FgLightRed},
"html": {Icon: "ξ", Color: color.FgLightRed},
"slim": {Icon: "ξ", Color: color.FgLightRed},
"ejs": {Icon: "ξ", Color: color.FgYellow},
"css": {Icon: "ξ", Color: color.FgBlue},
"less": {Icon: "ξ", Color: color.FgBlue},
"md": {Icon: "ξ", Color: color.FgYellow},
"markdown": {Icon: "ξ", Color: color.FgYellow},
"rmd": {Icon: "ξ", Color: color.FgWhite},
"json": {Icon: "ξ", Color: color.FgWhite},
"js": {Icon: "ξ", Color: color.FgWhite},
"mjs": {Icon: "ξ", Color: color.FgWhite},
"jsx": {Icon: "ξΊ", Color: color.FgBlue},
"rb": {Icon: "ξ", Color: color.FgRed},
"php": {Icon: "ξ", Color: color.FgMagenta},
"py": {Icon: "ξ", Color: color.FgYellow},
"pyc": {Icon: "ξ", Color: color.FgYellow},
"pyo": {Icon: "ξ", Color: color.FgYellow},
"pyd": {Icon: "ξ", Color: color.FgYellow},
"coffee": {Icon: "ξ", Color: color.FgYellow},
"mustache": {Icon: "ξ", Color: color.FgLightRed},
"hbs": {Icon: "ξ", Color: color.FgLightRed},
"conf": {Icon: "ξ", Color: color.FgWhite},
"ini": {Icon: "ξ", Color: color.FgWhite},
"yml": {Icon: "ξ", Color: color.FgWhite},
"yaml": {Icon: "ξ", Color: color.FgWhite},
"bat": {Icon: "ξ", Color: color.FgWhite},
"jpg": {Icon: "ξ", Color: color.FgCyan},
"jpeg": {Icon: "ξ", Color: color.FgCyan},
"bmp": {Icon: "ξ", Color: color.FgCyan},
"png": {Icon: "ξ", Color: color.FgCyan},
"gif": {Icon: "ξ", Color: color.FgCyan},
"ico": {Icon: "ξ", Color: color.FgCyan},
"twig": {Icon: "ξ", Color: color.FgGreen},
"cpp": {Icon: "ξ", Color: color.FgBlue},
"cxx": {Icon: "ξ", Color: color.FgBlue},
"cc": {Icon: "ξ", Color: color.FgBlue},
"cp": {Icon: "ξ", Color: color.FgBlue},
"c": {Icon: "ξ", Color: color.FgBlue},
"h": {Icon: "ο½", Color: color.FgWhite},
"hpp": {Icon: "ο½", Color: color.FgWhite},
"hxx": {Icon: "ο½", Color: color.FgWhite},
"hs": {Icon: "ξ", Color: color.FgWhite},
"lhs": {Icon: "ξ", Color: color.FgWhite},
"lua": {Icon: "ξ ", Color: color.FgMagenta},
"java": {Icon: "ξΈ", Color: color.FgMagenta},
"sh": {Icon: "ξ", Color: color.FgMagenta},
"fish": {Icon: "ξ", Color: color.FgGreen},
"bash": {Icon: "ξ", Color: color.FgWhite},
"zsh": {Icon: "ξ", Color: color.FgWhite},
"ksh": {Icon: "ξ", Color: color.FgWhite},
"csh": {Icon: "ξ", Color: color.FgWhite},
"awk": {Icon: "ξ", Color: color.FgWhite},
"ps1": {Icon: "ξ", Color: color.FgWhite},
"ml": {Icon: "Ξ»", Color: color.FgYellow},
"mli": {Icon: "Ξ»", Color: color.FgYellow},
"diff": {Icon: "ξ¨", Color: color.FgWhite},
"db": {Icon: "ξ", Color: color.FgBlue},
"sql": {Icon: "ξ", Color: color.FgBlue},
"dump": {Icon: "ξ", Color: color.FgBlue},
"clj": {Icon: "ξ¨", Color: color.FgGreen},
"cljc": {Icon: "ξ¨", Color: color.FgGreen},
"cljs": {Icon: "ξͺ", Color: color.FgGreen},
"edn": {Icon: "ξͺ", Color: color.FgGreen},
"scala": {Icon: "ξ·", Color: color.FgRed},
"go": {Icon: "ξ§", Color: color.FgWhite},
"dart": {Icon: "ξ", Color: color.FgWhite},
"xul": {Icon: "ξ
", Color: color.FgLightRed},
"sln": {Icon: "ξ", Color: color.FgMagenta},
"suo": {Icon: "ξ", Color: color.FgMagenta},
"pl": {Icon: "ξ©", Color: color.FgBlue},
"pm": {Icon: "ξ©", Color: color.FgBlue},
"t": {Icon: "ξ©", Color: color.FgBlue},
"rss": {Icon: "ξ", Color: color.FgLightRed},
"fsscript": {Icon: "ξ§", Color: color.FgBlue},
"fsx": {Icon: "ξ§", Color: color.FgBlue},
"fs": {Icon: "ξ§", Color: color.FgBlue},
"fsi": {Icon: "ξ§", Color: color.FgBlue},
"rs": {Icon: "ξ¨", Color: color.FgLightRed},
"rlib": {Icon: "ξ¨", Color: color.FgLightRed},
"d": {Icon: "ξ―", Color: color.FgRed},
"erl": {Icon: "ξ±", Color: color.FgMagenta},
"ex": {Icon: "ξ", Color: color.FgMagenta},
"exs": {Icon: "ξ", Color: color.FgMagenta},
"eex": {Icon: "ξ", Color: color.FgMagenta},
"hrl": {Icon: "ξ±", Color: color.FgMagenta},
"vim": {Icon: "ξ«", Color: color.FgGreen},
"ai": {Icon: "ξ΄", Color: color.FgLightRed},
"psd": {Icon: "ξΈ", Color: color.FgBlue},
"psb": {Icon: "ξΈ", Color: color.FgBlue},
"ts": {Icon: "ξ¨", Color: color.FgBlue},
"tsx": {Icon: "ξΊ", Color: color.FgWhite},
"jl": {Icon: "ξ€", Color: color.FgMagenta},
"pp": {Icon: "ο", Color: color.FgWhite},
"vue": {Icon: "ο΅", Color: color.FgGreen},
}
func NewIconString(suffix string) string {
icon, ok := icons[suffix]
if !ok {
icon = defaultFileIcon
}
return color.New(icon.Color).Sprint(icon.Icon)
}