romkatv / powerlevel10k

A Zsh theme
MIT License
45.76k stars 2.16k forks source link

Replace generic Tux icon with OS specific logos for nerdfont-complete #2717

Closed Syphdias closed 3 months ago

Syphdias commented 3 months ago

This should fix #2716. I use POWERLEVEL9K_MODE=nerdfont-complete and I can see the icons. I am not sure if that is enough justification that this actually works. I stole the lines from nerdfont-v3 I believe.

I am also not sure when there is a hard space and when the $s should be used.

HTH

romkatv commented 3 months ago

This icon was added to Nerd Fonts only in the v3 release, so it can be used by p10k only under POWERLEVEL9K_MODE=nerdfont-v3.

You can try the following:

  1. Install a font from https://github.com/ryanoasis/nerd-fonts/releases/tag/v2.3.3.
  2. Run p10k configure.
  3. Run print_icon LINUX_ENDEAVOUROS_ICON.

Before this PR the last step will print the Linux Tux logo. After this PR it'll print a glyph that cannot be displayed by the terminal (unless you've set up a fallback font).

The correct solution to https://github.com/romkatv/powerlevel10k/issues/2716 is to prefer POWERLEVEL9K_MODE=nerdfont-v3 over POWERLEVEL9K_MODE=nerdfont-complete in the wizard when the font contains both v3 and v2 glyphs. This used to be the case but I had to revert it in b474978b2e9435c10ca66f8281352ebc825264f4 due to a bug in Windows Terminal. I've now verified that the bug has been fixed and reverted b474978b2e9435c10ca66f8281352ebc825264f4 in df8ed163438c1989da4daeb4174bfcb30abb285e.

Syphdias commented 3 months ago

And I thought I could help for once :laughing: Also, what a roller coaster of preferences…

romkatv commented 3 months ago

You've helped this project more than you realize.