I noticed in a number of your screen recordings where transient prompt is enabled you've got the prompt at the bottom of the terminal window.
e.g. https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/performance.gif
Is this just a visual trick with the recording, or do you really have a way to have GNOME terminal start with the prompt at the bottom of the window? If the latter, would you mind sharing?
Thanks for building such a useful and enjoyable tool.
or do you really have a way to have GNOME terminal start with the prompt at the bottom of the window
put this line in your zshrc, before load instant prompt.
printf '\n%.0s' {1..100}
put this line in your zshrc, before load instant prompt.
Yes, that's pretty much how I've recorded this. You can even see cursor in the top-left corner on the first frame of the gif.
I found that for users who aren't familiar with transient prompt it's much easier to follow what's going on when prompt is at the bottom. After you use transient prompt for a little while, it becomes natural regardless of prompt position.
To bump a closed issue; I think this would be a good configuration option. When I saw the gif for transient prompts I expected (and was hoping) it would push the input to the bottom.
It's easy to push cursor to the bottom of the screen when you start zsh. The problem is that it can be pushed up by zle, zle widgets and external commands. When this happens, there is no way to push it back down without filling (a portion of) screen with empty space. This feature could be implemented in a terminal but not on the level of applications running in the terminal.
When using xterm with these lines in .zshrc (set before powerlevel10k, which is configured with sparse lines, instant prompt and transient prompt),
# Change cursor to I-beam
printf '\033[5 q\r'
# Move prompt to the bottom
printf '\n%.0s' {1..100}
the prompt appears at shell startup like so:
.
.
.
.
.
.
.~/my-prompt
.❯ |
.
but after using a command, it shifts to the bottommost line like so:
.
.
.
.❯ echo 123
.123
.
.~/my-prompt
.❯ |
Would it be possible to fix this inconsistency (i.e. have the prompt either always have an empty line under it or always show on the bottommost line - ideally the former)?
Would it be possible to fix this inconsistency (i.e. have the prompt either always have an empty line under it
This is impossible without patching the source code of your terminal emulator.
or always show on the bottommost line
You can do this by adding the following parameter to ~/.p10k.zsh:
typeset -g POWERLEVEL9K_INSTANT_PROMPT_COMMAND_LINES=0
It doesn't matter where exactly in ~/.p10k.zsh you add it. Next to the existing POWERLEVEL9K_INSTANT_PROMPT would be sensible.
Once you add the parameter, restart zsh (e.g., with exec zsh) twice.
Most helpful comment
put this line in your zshrc, before load instant prompt.