romkatv / powerlevel10k

A Zsh theme
MIT License
46.6k stars 2.19k forks source link

Reduce line spacing in sparse prompt mode or Add line spacing in compact mode. #1665

Closed govarthenan closed 2 years ago

govarthenan commented 2 years ago

Hi, I'm a beginner-level user and I'm loving this theme/framework. I can't find the configuration to reduce the width of the blank like between two prompts. I know it's dependent on the font size, so maybe there is a way to add some spacing between prompts in compact mode?

I searched .p10k.zsh and the README in the repo, but can't find anything useful regarding this problem. Please help me out.

And thanks to all who made this possible.

romkatv commented 2 years ago

Please describe what you do, what you expect, and what you observe.

govarthenan commented 2 years ago

So in this part of the configuration, if I select the Compact option, I feel like the prompts are placed too tightly, thus making it harder to read the terminal.

If I select the Sparse option, too much vertical space is being wasted on the newlines added between the prompt, denoted by typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true in .p10k.zsh.

So I'm trying to find out a way to add a custom width to the blank line that separates prompts. Note that I only want to reduce the vertical spacing between the prompts, so reducing the font size isn't a viable option.

romkatv commented 2 years ago

This is not possible. The screen of a text-based terminal is made of equal rectangles. Sparse adds one empty line while dense adds zero empty lines. It's not possible to add 0.5 empty lines.

If you are optimizing for productivity, see https://github.com/romkatv/powerlevel10k#what-is-the-best-prompt-style-in-the-configuration-wizard. Basically, go Lean, two lines, sparse, transient prompt. If you are optimizing for the looks (to post cool screenshots, etc.), then there are other good options.

govarthenan commented 2 years ago

Thanks, I understand. I'll have a look at the resources you mentioned.