lsd icon indicating copy to clipboard operation
lsd copied to clipboard

--icon-theme unicode showing only questionmarks

Open Mellbourn opened this issue 2 years ago • 13 comments

Hi, thanks for a great tool!

lsd is working well for me with Nerd Fonts set up.

However, it might be even prettier if it actually used the colorful unicode icons, e.g. 📁.

I would have guessed that lsd --icon-theme unicode would achieve that, but it only shows question marks for me:

image

This is lsd 0.20.1 installed using brew on macOS Big Sur 11.6.1 (running on an m1 MacBook) running inside iTerm2 3.4.12 (but it behaves the same in Terminal 2.11).

I am able to display unicode icons using echo image

Is this a bug, or is there some configuration I need to do?

Mellbourn avatar Dec 09 '21 11:12 Mellbourn

did some investigation, looks like a bug, unicode has fewer use cases, maybe need some check and updates.

zwpaper avatar Dec 10 '21 04:12 zwpaper

Also came here to report this. In both iTerm and Kitty I'm using a font called Ricty Diminished with Fira Code, it is basically a Fira Code offshoot that supports Japanese text.

In iTerm, for whatever reason its all question marks. In Kitty, it sometimes ends up appearing as Chinese/Japanese characters.

Here's some screenshots from iTerm. Screen Shot 2021-12-15 at 10 13 19 Screen Shot 2021-12-15 at 10 14 03

Here's some screenshots from Kitty. Screen Shot 2021-12-15 at 10 13 37 Screen Shot 2021-12-15 at 10 13 48

I'm on a 2019 Intel Macbook Pro running Macos Monterey. lsd was installed using brew.

MichaelCharles avatar Dec 15 '21 01:12 MichaelCharles

Hi @mcaubrey, thanks for the report, but It seems that you were facing a different problem with the font, lsd have to use a patched font with emoji support, please check https://github.com/Peltoche/lsd#prerequisites.

zwpaper avatar Dec 15 '21 06:12 zwpaper

Thanks! I'll check that out.

MichaelCharles avatar Dec 15 '21 06:12 MichaelCharles

@zwpaper I'm just reporting back to say you were right, the steps suggested on https://github.com/Peltoche/lsd#prerequisites have worked perfectly for me.

Screen Shot 2021-12-16 at 14 27 34

MichaelCharles avatar Dec 16 '21 05:12 MichaelCharles

Just gentle reminder that the original issue was actually not the same as that of @mcaubrey and the fix for his problem did not fix the original problem.

Mellbourn avatar Jan 20 '22 23:01 Mellbourn

Hi @Mellbourn, sorry for the later reply, I finally found out that the Unicode we used in lsd is version 7.0, and it may have some render problems.

I can reproduce it on my mac, but not yet figured out how to render the 7.0 unicode.

for example:

  • we used the folder 1F5C0 it also does not render well in my browser
  • I try to use a previous version one 1F4C1, it works as expected.

BUT! please notice, unicode icon theme is not well implemented, we only have the file and folder icons.

@meain how about we change the default Unicode back to version 6, it may add much more compatibility to lsd.

also, BTW, I am trying to work on the icon theme, I may leave a seat for unicode theme, then it will have a chance to create a custom unicode icon theme.

zwpaper avatar Jul 25 '22 06:07 zwpaper

Just a personal opinion, switching to 1f4c1 drops the "terminally" feeling as it looks more like an emoji. If we can find something that will let us do without it, that would be better. Lot of terminal emulators also have problems with rendering multi colored glyphs and so using emojis might not be a good idea in that case as well.

meain avatar Jul 26 '22 06:07 meain

although I am not one of the target users, the Unicode option is designed to act like that with colorful glyphs?

check starship for example

image

zwpaper avatar Jul 26 '22 07:07 zwpaper

I think if we can stick to non color glyphs, it would be better. But since unicode is more of a fallback (at least in my mind), if there is no other good option, we can switch to color glyphs.

meain avatar Jul 26 '22 11:07 meain

IMHO, Unicode is act more like another option according to the --icon-theme option.

the real problem like this issue is that we are now offering a non-functional feature --icon-theme unicode, it may not work on most OSes, that is why I think we should use a more compatible default code.

zwpaper avatar Jul 26 '22 15:07 zwpaper

I see your point, but I am still not yet fully convinced that adding color glyphs is the best approach (Apart from changing the looks, I have seen quite a few terminal emulators having issues with rendering multi-color emojis, but I guess those will just render monochrome versions). Let me take another look into this in the coming days and we can finalize one something.

meain avatar Jul 26 '22 16:07 meain

I think we will leave the unicode icons as is. The original issue was around being able to use emojis (colorful unicode icons) as icons in lsd. That I think would be covered once we have https://github.com/Peltoche/lsd/pull/707 .

meain avatar Aug 14 '22 06:08 meain