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

Blurred heads and tails look horrible #537

Closed
arkaitzsilva opened this issue Feb 29, 2020 · 18 comments
Closed

Blurred heads and tails look horrible #537

arkaitzsilva opened this issue Feb 29, 2020 · 18 comments

Comments

@arkaitzsilva
Copy link

Hi, I'm usin MesloLGS NF font in my Konsole terminal but it looks horrible I don't know why, I configured powerlevel10k in Chakra Linux an Elementary and I had no issues but with Nitrux I'm not able to configure the terminal properly, blurred heads and tails have different types of tiny dots.

¿Is there something I'm missing?

Screenshot_20200229_162628

Thanks

@romkatv
Copy link
Owner

romkatv commented Feb 29, 2020

These glyphs looks good in terminals that have native support for Block Elements. Konsole isn't one of them. You can file a feature request with Konsole, use a different terminal, or type p10k configure and select style that looks better in Konsole.

@romkatv romkatv closed this as completed Feb 29, 2020
@romkatv
Copy link
Owner

romkatv commented Feb 29, 2020

OK, there is another way, although it requires a bit of work on your part. If your zsh version is >= 5.7.1, and your terminal supports truecolor, and you can figure out the rgb values for the terminal background and the prompt line, then you can make it look nice.

Here's a screenshot from Konsole I just took:

image

I selected "dark" color in p10k configure, which sets POWERLEVEL9K_BACKGROUND=236 in ~/.p10k.zsh. Color 236 is #303030 (see here). My background color in Konsole is completely black -- #000000. So these three colors are equally spaced in between: #1E1E1E, #121212, and #060606. You can verify this with the following command:

print -P '%K{#303030} %B%F{39}~%f%b %K{#1E1E1E} %K{#121212} %K{#060606} %K{#000000} %k'

I opened ~/.p10k.zsh and changed the following parameters:

# The right end of left prompt.
typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='%K{#1E1E1E} %K{#121212} %K{#060606} %k'
# The left end of right prompt.
typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%K{#060606} %K{#121212} %K{#1E1E1E} %k'

And voilà! With this technique you can make blur as long or as short as you like.

@arkaitzsilva
Copy link
Author

Thanks! the workaround worked but it has to be something else, not only the fact that Konsole is not supported because I installed Chakra Linux and powerlevel10k works perfectly in Konsole without the workaround.

Screenshot_20200229_203109

@romkatv
Copy link
Owner

romkatv commented Feb 29, 2020

it has to be something else

Blurred heads and tails look good in terminals that have built-in support for Block Elements. They look bad in terminals that pull Block Elements from the font. I'm 100% certain this is true.

If blurred heads and tails look good in Chakra Linux, it means Block Elements enjoy built-in support in Chakra Linux.

not only the fact that Konsole is not supported

This isn't the right way to put it. Konsole in some environments renders Block Elements poorly.

@phoenixleonardo
Copy link

phoenixleonardo commented Apr 15, 2020

Hello @romkatv ,

I'm using the Powerline10K theme on my MacBook Pro with Oh-My-ZSH and iterm 2. I've followed all the steps and installed the MesloLGS NF font. However, the blurred heads look similar to what is mentioned in this issue.

I've followed the workaround which you mentioned above. Is this happening because iterm 2 doesn't support Block elements natively or is it something else.

I've also tried it in the Terminal app and also in VS Code with the same results.

Could you please let me know if there is anything else that can be done for the blurred endings to be rendered correctly?

@romkatv
Copy link
Owner

romkatv commented Apr 15, 2020

Is this happening because iterm 2 doesn't support Block elements natively

Yes.

Could you please let me know if there is anything else that can be done for the blurred endings to be rendered correctly?

Either use a terminal that renders block elements natively (I don't know if any macOS terminal can do this) or use the workaround from #537. There are no other ways.

@phoenixleonardo
Copy link

Thanks for the quick reply! 👍

@leocifer
Copy link

And voilà! With this technique you can make blue as long or as short as you like.

This was the only way I was able to get it working with kitty. With st it seems to work fine without the workaround.

@prldm
Copy link

prldm commented Oct 21, 2020

I have exactly the same issue, but on macOS, with the inbuilt Terminal and iTerm2 too. I don't really understand it, it must be a user error or smth like that. I watched a few videos, and asked friends, and noone had an issue like this, they just installed the MesloLGS NF font, and worked in both terminals without any workaround. What should I do?
image

@romkatv
Copy link
Owner

romkatv commented Oct 21, 2020

@preludium975 Your screenshot looks as expected. That's how it looks in iTerm2 and Apple Terminal. It looks the same for everyone, so it's not something that's broken just for you. The first two comments on this issue provide the explanation for this and list what you can do.

@prldm
Copy link

prldm commented Feb 5, 2021

Could you recommend me a Terminal on macOS which renders block elements properly? I tried a few but none of them worked.

@romkatv
Copy link
Owner

romkatv commented Feb 5, 2021

I don’t know.

@gusbemacbe
Copy link

gusbemacbe commented Feb 9, 2021

@preludium975

I have exactly the same issue, but on macOS, with the inbuilt Terminal and iTerm2 too. I don't really understand it, it must be a user error or smth like that. I watched a few videos, and asked friends, and noone had an issue like this, they just installed the MesloLGS NF font, and worked in both terminals without any workaround. What should I do?
image

You do not need to try to find another terminal. On both Linux and macOS, you need to change the Unicode codes to pure hexadecimal colours. Compare the left and the right:

imagem

Use colour picker to imitate the colours of Unicode codes. Go to the file p10k.zsh, find the ugly blurry heads and change from, for example:

typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='░▒▓'
typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='▓▒░'

to

typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%K{#585854} %K{#84847C} %K{#B1B1A5} %k'
typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='%K{#B1B1A5} %K{#84847C} %K{#585854} %k'

@romkatv
Copy link
Owner

romkatv commented Feb 9, 2021

@gusbemacbe This is already mentioned in the second comment of this issue: #537 (comment)

@gusbemacbe
Copy link

@gusbemacbe This is already mentioned in the second comment of this issue: #537 (comment)

I am very sorry.

Maybe he did not read or understand your comment or thought that worked only for Konsole or Linux users.

Since I was macOS user for a decade, there is not any terminal that can make ░▒▓ and ▓▒░ smooth. The only terminal that I know, can make these heads smooth, it is Termite.

I am not sure if he can compile and make Termite on macOS. He need to use Homebrew, Linuxbrew and Macports to port Termite on macOS.

@romkatv
Copy link
Owner

romkatv commented Feb 10, 2021

Maybe he did not read or understand your comment or thought that worked only for Konsole or Linux users.

Maybe, although there is no indication of this. The question @preludium975 has asked is reasonable either way.

Since I was macOS user for a decade, there is not any terminal that can make ░▒▓ and ▓▒░ smooth. The only terminal that I know, can make these heads smooth, it is Termite.

All terminals based on VTE render block elements nicely. This includes arguably the most popular Linux terminal -- GNOME Terminal -- as well as a plethora of niche terminals such as Termite.

I am not sure if he can compile and make Termite on macOS.

Termite is a Linux-only terminal.

@DrymarchonShaun
Copy link

I know this is a really old issue, but I thought it was worth adding for anyone that might come across this in the next few days/weeks/months before Alacritty releases a stable update -- support for this was just merged a few days ago. For anyone thats on arch, the alacritty-git AUR package includes it. alacritty/alacritty@f717710

@makzef
Copy link

makzef commented Dec 1, 2023

In Konsole (or Yakuake) there is an option use line characters contained in font, the blur works correctly if this option is disabled. It seems disabled by default. But I mistakenly enabled option and thats why I got strange-looking head/tail.

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants