Skip to content

Commit

Permalink
Separate icon file / folder defaults.
Browse files Browse the repository at this point in the history
  • Loading branch information
drn committed Sep 7, 2018
1 parent dde2926 commit dcfffbe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions icon/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ func ForFile(name string) rune {
alias := fileAliases[ext]
if alias != "" { ext = alias }
icon := files[ext]
if icon == 0 { return files["file"] }
if icon == 0 { return fileDefault }
return icon
}

var fileDefault = '\uf15b'

var fileAliases = map[string]string{
"apk": "android",
"gradle": "android",
Expand Down Expand Up @@ -135,7 +137,6 @@ var files = map[string]rune{
"env": '\uf462',
"epub": '\ue28a',
"erl": '\ue7b1',
"file": '\uf15b',
"font": '\uf031',
"gform": '\uf298',
"git": '\uf7a1',
Expand Down
5 changes: 3 additions & 2 deletions icon/folders.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ func ForFolder(name string) rune {
alias := folderAliases[name]
if alias != "" { name = alias }
icon := folders[name]
if icon == 0 { return folders["folder"] }
if icon == 0 { return folderDefault }
return icon
}

var folderDefault = '\uf115'

var folderAliases = map[string]string{
"bin": "config",
"include": "config",
Expand All @@ -26,7 +28,6 @@ var folders = map[string]rune {
".Trash": '\uf1f8',
".vscode": '\ue70c',
"config": '\ue5fc',
"folder": '\uf115',
"hidden": '\uf023',
"lib": '\uf121',
"node_modules": '\ue718',
Expand Down

0 comments on commit dcfffbe

Please sign in to comment.