add nnn prompt segment; see #342

pull/411/head
romkatv 5 years ago
parent a9620d7dca
commit acb6b68a37

@ -75,6 +75,7 @@
context # user@hostname context # user@hostname
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger) ranger # ranger shell (https://github.com/ranger/ranger)
nnn # nnn shell (https://github.com/jarun/nnn)
vim_shell # vim shell indicator (:sh) vim_shell # vim shell indicator (:sh)
# midnight_commander # midnight commander shell (https://midnight-commander.org/) # midnight_commander # midnight commander shell (https://midnight-commander.org/)
vi_mode # vi mode (you don't need this if you've enabled prompt_char) vi_mode # vi mode (you don't need this if you've enabled prompt_char)
@ -530,6 +531,12 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color.
typeset -g POWERLEVEL9K_NNN_FOREGROUND=72
# Custom icon.
# typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
###########################[ vim_shell: vim shell indicator (:sh) ]########################### ###########################[ vim_shell: vim shell indicator (:sh) ]###########################
# Vim shell indicator color. # Vim shell indicator color.
typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34 typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34

@ -75,6 +75,7 @@
context # user@hostname context # user@hostname
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger) ranger # ranger shell (https://github.com/ranger/ranger)
nnn # nnn shell (https://github.com/jarun/nnn)
vim_shell # vim shell indicator (:sh) vim_shell # vim shell indicator (:sh)
# midnight_commander # midnight commander shell (https://midnight-commander.org/) # midnight_commander # midnight commander shell (https://midnight-commander.org/)
# vpn_ip # virtual private network indicator # vpn_ip # virtual private network indicator
@ -523,6 +524,12 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color.
typeset -g POWERLEVEL9K_NNN_FOREGROUND=72
# Custom icon.
# typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
###########################[ vim_shell: vim shell indicator (:sh) ]########################### ###########################[ vim_shell: vim shell indicator (:sh) ]###########################
# Vim shell indicator color. # Vim shell indicator color.
typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34 typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34

@ -75,6 +75,7 @@
context # user@hostname context # user@hostname
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger) ranger # ranger shell (https://github.com/ranger/ranger)
nnn # nnn shell (https://github.com/jarun/nnn)
vim_shell # vim shell indicator (:sh) vim_shell # vim shell indicator (:sh)
# midnight_commander # midnight commander shell (https://midnight-commander.org/) # midnight_commander # midnight commander shell (https://midnight-commander.org/)
vi_mode # vi mode (you don't need this if you've enabled prompt_char) vi_mode # vi mode (you don't need this if you've enabled prompt_char)
@ -529,6 +530,13 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color.
# typeset -g POWERLEVEL9K_NNN_FOREGROUND=0
# typeset -g POWERLEVEL9K_NNN_BACKGROUND=6
# Custom icon.
# typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
###########################[ vim_shell: vim shell indicator (:sh) ]########################### ###########################[ vim_shell: vim shell indicator (:sh) ]###########################
# Vim shell indicator color. # Vim shell indicator color.
# typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=0 # typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=0

@ -122,6 +122,7 @@ function _p9k_init_icons() {
GCLOUD_ICON 'G' GCLOUD_ICON 'G'
LUA_ICON 'lua' LUA_ICON 'lua'
PERL_ICON 'perl' PERL_ICON 'perl'
NNN_ICON 'nnn'
) )
;; ;;
'awesome-fontconfig') 'awesome-fontconfig')
@ -231,6 +232,7 @@ function _p9k_init_icons() {
GCLOUD_ICON 'G' GCLOUD_ICON 'G'
LUA_ICON 'lua' LUA_ICON 'lua'
PERL_ICON 'perl' PERL_ICON 'perl'
NNN_ICON 'nnn'
) )
;; ;;
'awesome-mapped-fontconfig') 'awesome-mapped-fontconfig')
@ -344,6 +346,7 @@ function _p9k_init_icons() {
GCLOUD_ICON 'G' GCLOUD_ICON 'G'
LUA_ICON 'lua' LUA_ICON 'lua'
PERL_ICON 'perl' PERL_ICON 'perl'
NNN_ICON 'nnn'
) )
;; ;;
'nerdfont-complete'|'nerdfont-fontconfig') 'nerdfont-complete'|'nerdfont-fontconfig')
@ -454,6 +457,7 @@ function _p9k_init_icons() {
GCLOUD_ICON '\uF7B7' #  GCLOUD_ICON '\uF7B7' # 
LUA_ICON '\uE620' #  LUA_ICON '\uE620' # 
PERL_ICON '\uE769' #  PERL_ICON '\uE769' # 
NNN_ICON 'nnn'
) )
;; ;;
*) *)
@ -563,6 +567,7 @@ function _p9k_init_icons() {
GCLOUD_ICON 'G' GCLOUD_ICON 'G'
LUA_ICON 'lua' LUA_ICON 'lua'
PERL_ICON 'perl' PERL_ICON 'perl'
NNN_ICON 'nnn'
) )
;; ;;
esac esac

@ -3678,6 +3678,15 @@ function instant_prompt_midnight_commander() {
_p9k_prompt_segment prompt_midnight_commander $_p9k_color1 yellow MIDNIGHT_COMMANDER_ICON 0 '$MC_TMPDIR' '' _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() { function prompt_vim_shell() {
[[ -n $VIMRUNTIME ]] || return [[ -n $VIMRUNTIME ]] || return
_p9k_prompt_segment $0 green $_p9k_color1 VIM_ICON 0 '' '' _p9k_prompt_segment $0 green $_p9k_color1 VIM_ICON 0 '' ''

Loading…
Cancel
Save