diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2020-01-02 20:59:19 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2020-01-02 20:59:19 +0300 |
commit | acb6b68a37213a4362b1b27f3c2ca14ad2adb86e (patch) | |
tree | 2ee175177a4ef6fc4c94bd03bce39a7e69423c9c /internal | |
parent | a9620d7dca5d2d49884aafd4d7f645b7686c41b0 (diff) |
add nnn prompt segment; see #342
Diffstat (limited to 'internal')
-rw-r--r-- | internal/icons.zsh | 5 | ||||
-rw-r--r-- | internal/p10k.zsh | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/internal/icons.zsh b/internal/icons.zsh index 3f240fe0..e16152fd 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -122,6 +122,7 @@ function _p9k_init_icons() { GCLOUD_ICON 'G' LUA_ICON 'lua' PERL_ICON 'perl' + NNN_ICON 'nnn' ) ;; 'awesome-fontconfig') @@ -231,6 +232,7 @@ function _p9k_init_icons() { GCLOUD_ICON 'G' LUA_ICON 'lua' PERL_ICON 'perl' + NNN_ICON 'nnn' ) ;; 'awesome-mapped-fontconfig') @@ -344,6 +346,7 @@ function _p9k_init_icons() { GCLOUD_ICON 'G' LUA_ICON 'lua' PERL_ICON 'perl' + NNN_ICON 'nnn' ) ;; 'nerdfont-complete'|'nerdfont-fontconfig') @@ -454,6 +457,7 @@ function _p9k_init_icons() { GCLOUD_ICON '\uF7B7' # LUA_ICON '\uE620' # PERL_ICON '\uE769' # + NNN_ICON 'nnn' ) ;; *) @@ -563,6 +567,7 @@ function _p9k_init_icons() { GCLOUD_ICON 'G' LUA_ICON 'lua' PERL_ICON 'perl' + NNN_ICON 'nnn' ) ;; esac diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 08174e98..53ad4796 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -3678,6 +3678,15 @@ function instant_prompt_midnight_commander() { _p9k_prompt_segment prompt_midnight_commander $_p9k_color1 yellow MIDNIGHT_COMMANDER_ICON 0 '$MC_TMPDIR' '' } +function prompt_nnn() { + [[ $NNNLVL == (0|) ]] && return + _p9k_prompt_segment $0 6 $_p9k_color1 NNN_ICON 0 '' $NNNLVL +} + +function instant_prompt_nnn() { + _p9k_prompt_segment prompt_nnn 6 $_p9k_color1 NNN_ICON 1 '${NNNLVL:#0}' '$NNNLVL' +} + function prompt_vim_shell() { [[ -n $VIMRUNTIME ]] || return _p9k_prompt_segment $0 green $_p9k_color1 VIM_ICON 0 '' '' |