New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Icons #697
Icons #697
Conversation
I have. For the CI to be happy. |
I don't have patched fonts on my machines So I can't test this out. Could you provide a screenshot? I'm not a fan of having the icons in the far left when you enable |
Oops. Didn't realize where I put it. It's fixed now.
Some icons could look a bit better and it would be nice if they were all from a single font design, but I don't think I'll go looking for it. |
@leovilok can you please review this too? I need some time to get to this. |
I installed icons-in-terminal and can see them with But when I run
What am I missing? |
Btw another detail I'd bring up for discussion: Should there be a padding space between the file name and icons? My concern is Shift-doubleclicking to select text of the filename without grabbing the icon. |
And the same on terminator too! My font is monaco. Does that matter? |
Yes, a space would be great. |
With |
For me it works on both st and terminator. xterm and urxvt show a blank box but that's more or less expected. |
Don;t add the space after the icon BTW. Won't help. The space may get copied. |
You want a second space between them? xfce4-terminal works as well. Must be some issue on your side. |
@KlzXS can you please share a screenshot with the space added after the icon and let's see how it looks? |
I followed the steps here: https://github.com/sebastiencs/icons-in-terminal#installation |
|
How so? Terminals tends to use space or some other punctuation as a word delimiter. Unless you have a fancy terminal, Double clicking to select the filename would also copy the icon, which most likely isn't desireable.
No, if there is going to be a space added, I think 1 is enough. Try selecting text in your terminal with doubleclick see what happens. (Note that I hold down Shift in my terminal to select text in I would try it on my terminal, but I can't get icons working atm. |
Makes sense. Please have a single space. Also please make sure the columns adjustment is done. |
One space is added so that the icons don't overlap with the text (some rendering issue or something idk). Another one could be added so that there is a physical space between the icon and text. See screenshot above. Only the filename is selected. As with any other word. |
That's done automatically. You just need to change |
@KlzXS what is the content of your ~/.config/fontconfig/conf.d/30-icons.conf ? |
And which font are you using in your terminal? |
I haven't a slightest idea what any of this is, haven't touched it. |
It should be Liberation Mono. |
I need these fonts installed. For me it is:
|
I don't think you need all of them. A monospaced font is nice to have either way, I can't work properly with anything else. |
@KlzXS Which font are you using in your terminal? |
And I don't dare to argue ;). But hey, if you are comfortable, all is well. Anyway we can work on this when icon-specific colors are in. Need to wait for @KlzXS to update. |
@KlzXS please address the comments. You'll have to rebase as I did a minor update to Makefile. I think we are very near to completion. Once in, I will prepare for the next release. |
Sure thing. I'll send it in later tonight. Regarding icon colors, it should be a |
Yes, we support xterm 256 color, so 1 byte per color. |
58c9bdb
to
c8d3880
Compare
I am merging this. Can you please add icons related details in the Wiki? |
Thank you! |
We also need an entry to |
No icons with oldcolor. Small optimizatons
Small refinement for other matching
Hi guys , thanks for the help ! |
The icons are currently setup to work with icons-in-terminal out of the box. |
hi ! i don't know man ...really i tried everything nothing is working ..i tried to add the code from hack font in icons.h and recompile doesn't change anything ..icons should appear instantly when you launch nnn right ? another thing there's no shortcut or anything right to display the icons ? they should be displayed instantly when you launch nnn ? correct ? thanks again and sorry for my ignorance .. ! |
Yes replace the all-caps symbols with your strings. Did you compile using |
i changed the makefile and switch to 1 for ICONS yes |
FWIW |
well icons-on-terminals always worked for me ? i was always able to print all the glyph in my terminal without any problem ? |
Are you specifically using this project for rendering icons? https://github.com/sebastiencs/icons-in-terminal Otherwise #722 is of interest to you. |
Icons can be optionally be compiled in. They can be configured to be any printable string, although to get actual icons you need a patched font. This uses the
icons-in-terminal.h
generated header with the default configuration. I haven't included that header here as it should be generated when icons-in-terminal does its magic, so you can just copy that over to the sources folder.Padding (also any printable string) can be added from both left and right. On my system I needed a single space from the right side to prevent it overlapping with the entry name. You will need to figure out the proper amount for yourself.
All the configuration is done in the new
icons.h
header.The icons look good, I think they look much better if you apply the color of the entry to them so I did that.
I tested it on a directory with 3000+ files with all the extensions and I can't see a difference in load time.
Everything works when changing the number of columns.
When this gets merged I'll add a wiki entry explaining the usage there.