diff options
author | Ben Hilburn <bhilburn@gmail.com> | 2017-05-23 04:07:23 +0300 |
---|---|---|
committer | Ben Hilburn <bhilburn@gmail.com> | 2017-05-23 04:07:23 +0300 |
commit | 6486e62f1444048b5ba45584d7a8a647a5ab5137 (patch) | |
tree | dbcf03b6705bc8287847259ac537cdfca98b0fec /powerlevel9k.zsh-theme | |
parent | ff0766ec5e5aca9f1dda94e6e52769503ae60b3e (diff) | |
parent | e9e3e9dc538edc82bf8071919eca2fc9c56292a5 (diff) |
Merge branch 'pr/newline' of https://github.com/docwhat/powerlevel9k into docwhat-pr/newline
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 0f2445e6..e4629646 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -337,6 +337,23 @@ prompt_background_jobs() { fi } +# A newline in your prompt, so you can segments on multiple lines. +prompt_newline() { + local lws newline + [[ "$1" == "right" ]] && return + newline=$'\n' + lws=$POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS + if [[ "$POWERLEVEL9K_PROMPT_ON_NEWLINE" == true ]]; then + newline="${newline}$(print_icon 'MULTILINE_NEWLINE_PROMPT_PREFIX')" + fi + POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS= + "$1_prompt_segment" \ + "$0" \ + "$2" \ + "NONE" "NONE" "${newline}" + POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS=$lws +} + # Segment that indicates usage level of current partition. set_default POWERLEVEL9K_DISK_USAGE_ONLY_WARNING false set_default POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL 90 |