petobens / trueline

Fast and extensible bash powerline prompt with true color and fancy icon support
MIT License
385 stars 36 forks source link

Why if I installed all the nerd fonts, and clone and append the trueline.sh to my bashrc, when I connect to my server through SSH I get "unrecognized" symbols??? #25

Closed Neorick25 closed 3 years ago

Neorick25 commented 3 years ago

I followed the procedure that is discribed in the README, and after install the Nerdfonts (all of them) but when I connecteted to my server through SSH some symbols appear just an square, the same if I inspect the file trueline.sh through Vi or Nano...

The issue that I see in the SSH terminal: https://drive.google.com/file/d/1h7DO1kBTluS9IzfvpiJh27iGl2LJm6ba/view?usp=sharing

The lines in trueline.sh: https://drive.google.com/file/d/1PdSyPPFud-uPVyiK1FUnx8CtEC_87lm3/view?usp=sharing

Thanks in advance.

petobens commented 3 years ago

Hi. Do you actually have the nerd fonts properly installed? If they are not shown in your local machine they might not be available. Try opening the trueline.sh file with nano or vim from your local machine and take a screenshow of the output.

Neorick25 commented 3 years ago

How can I check that the fonts are installed? I could see that these fonts are under /home/terminator/.local/share/fonts/NerdFonts/ and /usr/share/fonts/, and I execute the command fc-cache -f -v.

Do you need all the trueline.sh? or just the capture where are the TRUELINE_SYMBOLS? If the last is enough, there are here: https://drive.google.com/file/d/1PdSyPPFud-uPVyiK1FUnx8CtEC_87lm3/view

Thanks a lot my friend for your support.

petobens commented 3 years ago

It seems then that even though you've installed the fonts they are not being used by terminator. I don't use terminator myself but it probably has a place where you can choose the "active" font. I believe that should fix your issue (you can see if the fonts are being used for instance by running vim and then within vim pressing Ctrl + v +u and then some unicode character such f171 which should render the bitbucket icon).

Neorick25 commented 3 years ago

Sorry petobens... I don´t understand the method to check if my user can check if the fonts are being used... if I press Ctrl+v inmediatly this paste the content of my clipboad... :(...

Neorick25 commented 3 years ago

Just to be sure, I'll want to change the font on my server that only can connect trough SSH... It is posible?

petobens commented 3 years ago

I want to make sure that you are actually using nerd fonts in your terminator terminal. In order to check that do: i) open terminator ii) open vim iii) open trueline.sh file See if the symbols are rendered properly within the vim window. If they aren't then you are not using the nerd fonts (even if they are installed).

Regarding the ssh question if you want to have trueline on the server then you need both trueline and nerd fonts on the server (i.e the bash on the server will draw the prompt, not your local machine).

petobens commented 3 years ago

Closing due to inactivity. Feel free to reopen if the problem persists.

parth-gohil commented 3 years ago

I am having a similar issue with fonts. I reckon I don't have the fonts installed in the correct manner, can someone help me with installing one font that entirely that is compatible with trueline?

petobens commented 3 years ago

Any of these fonts will work: https://github.com/ryanoasis/nerd-fonts

parth-gohil commented 3 years ago

Hi @petobens, thanks for the prompt response. I tried installing it on my windows machine and they don't seem to be working efficiently. I have installed "Ubuntu Mono Nerd Font" and that doesn't seem to work either in Windows context or in the WSL Ubuntu context. I see a lot of glyphs not appearing and I am still not able to figure out why that's the case. I have both my locales set so that it can allow UTF-8 but even then I don't see most of the glyphs not working.

petobens commented 3 years ago

Is your terminal actually using the font?

parth-gohil commented 3 years ago

Yes, I've actually changed the .bashrc file and the fonts do get changed. Not sure what the issue is. Could having multiple fonts have conflicts?

parth-gohil commented 3 years ago

In fact, the preview of Octicons fonts in windows font manager is also all screwed up I can only see the github icons.

petobens commented 3 years ago

Then the fonts weren't properly installed. There is not much trueline can do here. Try to fix the font installation system wise first.

parth-gohil commented 3 years ago

Noted. Thanks for isolating the issue.

parth-gohil commented 3 years ago

Just as an update I wanted to share that Windows Terminal application uses fonts that are specified inside it's own settings.

This means if you're trying to use trueline for your WSL2 environment using Windows Terminal, you need to install either of the nerd fonts on your windows environment and then specify the same font that you want your Ubuntu or any other Linux environment's Bash to use in the Windows Terminal's Settings using the fontFace property in it's JSON settings file.