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

icon not set #1026

Closed
mohammad5305 opened this issue May 26, 2021 · 10 comments
Closed

icon not set #1026

mohammad5305 opened this issue May 26, 2021 · 10 comments
Labels

Comments

@mohammad5305
Copy link

hi i compile nnn with flag O_ICONS=1 but icon not set and nerdfont and awesomefont also installed I even change my terminal font and terminal but same happend
termianl = st, konsole
font = nerd
distro = arch with i3wm
image

@jarun
Copy link
Owner

jarun commented May 26, 2021

@luukvbaal @leovilok please check.

@luukvbaal
Copy link
Collaborator

Looks like you're compiling with with O_NOLC=1, you can't do that if you wan't to use icons. See https://github.com/jarun/nnn/wiki/Developer-guides#compile-in-icons-in-terminal.

@luukvbaal
Copy link
Collaborator

Please confirm this was your issue. #1027 should prevent this situation from now on.

@jarun jarun mentioned this issue May 26, 2021
50 tasks
@luukvbaal
Copy link
Collaborator

luukvbaal commented May 27, 2021

Do icons work in your terminal outside of nnn? You say you're using a nerd font but are compiling with O_ICONS=1, you should compile with O_NERD=1.

The only way I know your icons would look like that is if you are compiling with both O_NOLC=1 and O_NERD/O_ICONS=1. If that's not what's going on I'm afraid I don't know.

@jarun
Copy link
Owner

jarun commented May 27, 2021

@mohammad5305 this appears to be a local issue. I'm afraid you'll have to debug it yourself or use nnn without icons (which is really not an issue because I see you have colors).

Also please ensure you have installed the icons correctly e.g. following https://github.com/sebastiencs/icons-in-terminal#installation

I have ~/.fonts/icons-in-terminal.ttf

and ~/.config/fontconfig/conf.d/30-icons.conf has:

<?xml version='1.0'?>                                                                                             
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <alias>
  <family>No font found</family>
  <prefer>
   <family>icons-in-terminal</family>
  </prefer>
 </alias>
 <alias>
  <family>Monospace</family>
  <prefer>
   <family>icons-in-terminal</family>
  </prefer>
 </alias>
 <match target="font">
  <edit name="rgba" mode="assign">
   <const>rgb</const>
  </edit>
 </match>
 <dir>~/.fonts</dir>
</fontconfig>

I guess that's the best we can do for you.

@mohammad5305
Copy link
Author

Do icons work in your terminal outside of nnn? You say you're using a nerd font but are compiling with O_ICONS=1, you should compile with O_NERD=1.

The only way I know your icons would look like that is if you are compiling with both O_NOLC=1 and O_NERD/O_ICONS=1. If that's not what's going on I'm afraid I don't know.

yeah icon show outside of nnn ,I try it too but not working
image

@mohammad5305
Copy link
Author

mohammad5305 commented May 27, 2021

@mohammad5305 this appears to be a local issue. I'm afraid you'll have to debug it yourself or use nnn without icons (which is really not an issue because I see you have colors).

Also please ensure you have installed the icons correctly e.g. following https://github.com/sebastiencs/icons-in-terminal#installation

I have ~/.fonts/icons-in-terminal.ttf

and ~/.config/fontconfig/conf.d/30-icons.conf has:

<?xml version='1.0'?>                                                                                             
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <alias>
  <family>No font found</family>
  <prefer>
   <family>icons-in-terminal</family>
  </prefer>
 </alias>
 <alias>
  <family>Monospace</family>
  <prefer>
   <family>icons-in-terminal</family>
  </prefer>
 </alias>
 <match target="font">
  <edit name="rgba" mode="assign">
   <const>rgb</const>
  </edit>
 </match>
 <dir>~/.fonts</dir>
</fontconfig>

I guess that's the best we can do for you.

i have that font too and added this my fontconfig but same happend
image

@luukvbaal
Copy link
Collaborator

luukvbaal commented May 27, 2021

yeah icon show outside of nnn ,I try it too but not working

Outisde of nnn but inside your terminal?

Your images now show no icons at all; not the widechar -> char glyphs you were experiencing in your initial post. Are you sure you're actually compiling in icons correctly. If nothing else there should at least be spacing in front of the file/dir names with icons compiled in.

@mohammad5305
Copy link
Author

yeah icon show outside of nnn ,I try it too but not working

Outisde of nnn but inside your terminal?

Your images now show no icons at all; not the widechar -> char glyphs you were experiencing in your initial post. Are you sure you're actually compiling in icons correctly. If nothing else there should at least be spacing in front of the file/dir names with icons compiled in.

inside of terminal I use nerdtree with icon in vim and show me the icon as well and for showing widechar I accidentally compile with wrong flag I try with right flag too but not working
image

@luukvbaal
Copy link
Collaborator

I don't see how this could happen except when compiling with both O_NERD/O_ICONS and O_NOLC (which is not possible anymore if you're on the latest commit).

Again, please make sure you're not including O_NOLC if you want icon support in nnn. If that's not what you're doing I'm also at a loss of why you would get those character instead of icons and I can't help you further.

@jarun jarun mentioned this issue Jun 2, 2021
10 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Jun 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants