Skip to content
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 are not getting picked up in Mac + Alacritty. #510

Closed
nippyin opened this issue Apr 16, 2021 · 7 comments
Closed

Icons are not getting picked up in Mac + Alacritty. #510

nippyin opened this issue Apr 16, 2021 · 7 comments
Labels
kind/question Asking how to use lsd or may not using correctly

Comments

@nippyin
Copy link

nippyin commented Apr 16, 2021

  • os: BigSur 11.2.3
  • lsd --version: lsd 0.20.1
  • echo $TERM: screen
  • echo $LS_COLORS: No Output

Expected behavior

If applicable, add the output of the classic ls command (\ls -la) in order to show the buggy file/directory.

 Documents  Virtual Machines.localized  post_cron_test
 Downloads  ab.txt  pre_cron_test

Actual behavior

If the application panics run the command with the trace (RUST_BACKTRACE=1 lsd ...).
In case of graphical errors, add a screenshot if possible.
Screen Shot 2021-04-16 at 11 06 01 AM

Need to see icons rather ? is shown. Kindly assist how to fix it.

@meain
Copy link
Member

meain commented Apr 18, 2021

Make sure that you are using fonts which have icons glyphs. Refer to https://github.com/ryanoasis/nerd-fonts/blob/master/readme.md for instructions on how to do that.

@zwpaper zwpaper added the kind/question Asking how to use lsd or may not using correctly label Apr 20, 2021
@ljramalho
Copy link

ljramalho commented Jun 12, 2021

I have the patched "Hack" nerd font installed in Windows 10. I'm using KiTTY (http://www.9bis.net/kitty/#!index.md) a PuTTY clone configured to use that font and display UTF-8.

I'm getting blocks (not the icons) when using lsd.

How do I know my environment is working, and not the lsd?

I've created a file:
$ nano t.sh

content is:
echo -e $'\Ue5ff'

$ chmod +x t.sh

then I run:
$ ./t.sh

and it has print the "folder" icon.

Find the "folder" glyph in here: https://www.nerdfonts.com/cheat-sheet

EDIT:
Using lsd arm gnueabihf on raspbian / raspberry OS running on raspberry pi.

@meain
Copy link
Member

meain commented Jun 12, 2021

@ljramalho Could you check if this (echo $'\uf115') glyph works. This is what we use for folders. It is possible that some glyphs that we use are missing in your font.

Screenshot 2021-06-12 at 10 36 52 AM

You can see all the others glyphs that we use here.

@ljramalho
Copy link

ljramalho commented Jun 13, 2021

Thank you.

I've tested "echo $'\uf115'" on the KiTTY (PuTTY derivative) ssh client and indeed it does NOT work with the patched "Hack" nerd font, leaving a box instead the "folder" symbol (very strange).

However, pasting the character into windows notepad and wordpad, both configured to use the the Hack NF font, it works!

In windows it is easy to use notepad, and type the sequence "f115 alt-x" to get the "folder symbol using the Hack NF font.

Also the windows versions of lsd also work well in the windows cmd prompt terminal when configured to use the Hack NF font.

So the glyph is not missing from the font I use, but somehow KiTTY is not behaving well.

So. I'm extremely confused...

Edit:
The command
echo $'\uf115'
works in PuTTY,

Thanks.

@meain
Copy link
Member

meain commented Jun 14, 2021

@ljramalho This is probably an issue with KiTTY and not lsd.

@abulka
Copy link

abulka commented Jun 18, 2021

I had the weird ? icons showing in Mac terminal too, when I ran lsd - instead of proper nice icons. I simply had to install nerd fonts using

brew tap homebrew/cask-fonts
brew install --cask font-hack-nerd-font

reboot, then as the lsd readme says

Don't forget to setup your terminal in order to use the correct font.

Detail

After a brew install the hack font was not showing up in any app, even though the fonts were in ~/Library/Fonts/. So I reboot my Mac so that the Mac rebuilt font caches, then the Hack font appeared OK in all my apps as a choice in font lists.

After the reboot, even running system_profiler SPFontsDataType|grep "Hack Nerd Font" finds the hack font OK.

Then I changed the font for Mac terminal using preferences, to be Hack Font. Then lsd icons appeared OK. And running echo $'\uf115' displays a folder icon ok.

@meain meain closed this as completed Jun 18, 2021
@ljramalho
Copy link

Hello.
Sorry the late reply, and sorry to pollute this thread
I now know what is happening.

  1. The terminal emulator I'm talking about is not KiTTY for mac. Its is KiTTY (https://github.com/cyd01/KiTTY) for windows based in the terminal emulator PuTTY. I don't know anything about KiTTY for mac, except that it exist and share the name with the other one.

  2. You are right indeed lsd is OK.The missing glyphs I reported are due to a KiTTY windows related problem, being it based in PuTTY 0.74, both with insufficient unicode support. The glyphs are shown correctly in the recent PuTTY 0.75.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Asking how to use lsd or may not using correctly
Projects
None yet
Development

No branches or pull requests

5 participants