Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions src/output/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,26 @@ pub fn iconify_style(style: Style) -> Style {
lazy_static! {
static ref MAP_BY_NAME: HashMap<&'static str, char> = {
let mut m = HashMap::new();
m.insert(".Trash", '\u{f1f8}'); // 
m.insert(".atom", '\u{e764}'); // 
m.insert(".bashprofile", '\u{e615}'); //
m.insert(".bashprofile", '\u{f489}'); //
m.insert(".bashrc", '\u{f489}'); // 
m.insert(".git", '\u{f1d3}'); // 
m.insert(".gitattributes", '\u{f1d3}'); // 
m.insert(".gitconfig", '\u{f1d3}'); // 
m.insert(".github", '\u{f408}'); // 
m.insert(".gitignore", '\u{f1d3}'); // 
m.insert(".gitmodules", '\u{f1d3}'); // 
m.insert(".pam_environment", '\u{e615}'); // 
m.insert(".rvm", '\u{e21e}'); // 
m.insert(".Trash", '\u{f1f8}'); // 
m.insert(".vimrc", '\u{e62b}'); // 
m.insert(".vscode", '\u{e70c}'); // 
m.insert(".xinitrc", '\u{f489}'); // 
m.insert(".xprofile", '\u{f489}'); // 
Comment on lines +65 to +66

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about these

m.insert(".zshrc", '\u{f489}'); // 
m.insert("Cargo.lock", '\u{e7a8}'); //
m.insert("AUTHORS", '\u{f718}'); //

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This symbol doesn't render for me

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they should render on the nerdfonts site: https://www.nerdfonts.com/cheat-sheet

I found it under 'document'
New name seems to be 'nf-md-file_document' (will be fixed with #9)

m.insert("bin", '\u{e5fc}'); // 
m.insert("Cargo.lock", '\u{e7a8}'); // 

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to be already present on main (at least it shows that icon when I run with --icons)

m.insert("config", '\u{e5fc}'); // 
m.insert("docker-compose.yml", '\u{f308}'); // 
m.insert("Dockerfile", '\u{f308}'); // 
Expand All @@ -81,12 +85,17 @@ lazy_static! {
m.insert("hidden", '\u{f023}'); // 
m.insert("include", '\u{e5fc}'); // 
m.insert("lib", '\u{f121}'); // 
m.insert("LICENSE", '\u{f718}'); // 

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This symbol doesn't render for me

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same document icon 'nf-md-file_document'

m.insert("localized", '\u{f179}'); // 
m.insert("Makefile", '\u{f489}'); // 
m.insert("node_modules", '\u{e718}'); // 
m.insert("npmignore", '\u{e71e}'); // 
m.insert("PKGBUILD", '\u{f303}'); // 
m.insert("requirements.txt", '\u{e615}'); // 
m.insert("rubydoc", '\u{e73b}'); // 
m.insert("Trash", '\u{f1f8}'); // 
m.insert("xinitrc", '\u{f489}'); // 
m.insert("xserverrc", '\u{f489}'); // 
m.insert("yarn.lock", '\u{e718}'); // 

m
Expand All @@ -108,6 +117,7 @@ pub fn icon_for_file(file: &File<'_>) -> char {
else if let Some(icon) = extensions.icon_file(file) { icon }
else if let Some(ext) = file.ext.as_ref() {
match ext.as_str() {
"a" => '\u{f17c}', // 

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure what this even is

"ai" => '\u{e7b4}', // 
"android" => '\u{e70e}', // 
"apk" => '\u{e70e}', // 
Expand All @@ -118,6 +128,7 @@ pub fn icon_for_file(file: &File<'_>) -> char {
"awk" => '\u{f489}', // 
"bash" => '\u{f489}', // 
"bash_history" => '\u{f489}', // 
"bash_logout" => '\u{f489}', // 

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is optimal

"bash_profile" => '\u{f489}', // 
"bashrc" => '\u{f489}', // 
"bat" => '\u{f17a}', // 
Expand Down Expand Up @@ -249,6 +260,7 @@ pub fn icon_for_file(file: &File<'_>) -> char {
"m4a" => '\u{f001}', // 
"markdown" => '\u{f48a}', // 
"md" => '\u{f48a}', // 
"mdb" => '\u{f1c0}', // 
"mjs" => '\u{e74e}', // 
"mk" => '\u{f489}', // 
"mkd" => '\u{f48a}', // 
Expand Down