How to configure the margin for terminal output (gnome + zsh)?

Viewed 30

Does anyone know how I can set "margins" for terminal output?

As you can see in the screenshot below, I'm working with a custom two-line terminal prompt. The prompt itself has:

  1. a top margin, which is just a "\n" prepended to the prompt lines.
  2. a left margin, which is just a whitespace character prepended to the prompt lines.

terminal output

I would like to achieve the same aesthetical result with the output, adding a top and left margin to it.

My terminal configs: gnome-terminal + zsh + oh-my-zsh.

My zsh custom theme config goes something like this:

TOP_MARGIN=$'\n'
LEFT_MARGIN=' '

PROMPT_FIRST_LINE=${TOP_MARGIN}${LEFT_MARGIN}
PROMPT_FIRST_LINE+='┌─ ➜  '

PROMPT_SECOND_LINE=${TOP_MARGIN}${LEFT_MARGIN}
PROMPT_SECOND_LINE+='└─ >  '

PROMPT=${PROMPT_FIRST_LINE}${PROMPT_SECOND_LINE}
0 Answers
Related