mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-11 00:00:06 +00:00
add vim_shell prompt segment; see #359
This commit is contained in:
parent
e0697c200f
commit
113f290826
5 changed files with 37 additions and 1 deletions
|
@ -69,6 +69,7 @@
|
|||
context # user@hostname
|
||||
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
|
||||
ranger # ranger shell (https://github.com/ranger/ranger)
|
||||
vim_shell # vim shell indicator (:sh)
|
||||
# midnight_commander # midnight commander shell (https://midnight-commander.org/)
|
||||
vi_mode # vi mode (you don't need this if you've enabled prompt_char)
|
||||
# vpn_ip # virtual private network indicator
|
||||
|
@ -519,6 +520,12 @@
|
|||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
###########################[ vim_shell: vim shell indicator (:sh) ]###########################
|
||||
# Vim shell indicator color.
|
||||
typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]######
|
||||
# Midnight Commander shell color.
|
||||
typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
context # user@hostname
|
||||
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
|
||||
ranger # ranger shell (https://github.com/ranger/ranger)
|
||||
vim_shell # vim shell indicator (:sh)
|
||||
# midnight_commander # midnight commander shell (https://midnight-commander.org/)
|
||||
# vpn_ip # virtual private network indicator
|
||||
# ram # free RAM
|
||||
|
@ -512,6 +513,12 @@
|
|||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
###########################[ vim_shell: vim shell indicator (:sh) ]###########################
|
||||
# Vim shell indicator color.
|
||||
typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]######
|
||||
# Midnight Commander shell color.
|
||||
typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
context # user@hostname
|
||||
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
|
||||
ranger # ranger shell (https://github.com/ranger/ranger)
|
||||
vim_shell # vim shell indicator (:sh)
|
||||
# midnight_commander # midnight commander shell (https://midnight-commander.org/)
|
||||
vi_mode # vi mode (you don't need this if you've enabled prompt_char)
|
||||
# vpn_ip # virtual private network indicator
|
||||
|
@ -518,6 +519,13 @@
|
|||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
###########################[ vim_shell: vim shell indicator (:sh) ]###########################
|
||||
# Vim shell indicator color.
|
||||
# typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=0
|
||||
# typeset -g POWERLEVEL9K_VIM_SHELL_BACKGROUND=2
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]######
|
||||
# Midnight Commander shell color.
|
||||
# typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=3
|
||||
|
|
|
@ -112,6 +112,7 @@ function _p9k_init_icons() {
|
|||
LARAVEL_ICON ''
|
||||
RANGER_ICON '\u2B50' # ⭐
|
||||
MIDNIGHT_COMMANDER_ICON 'mc'
|
||||
VIM_ICON 'vim'
|
||||
TERRAFORM_ICON '\U1F6E0\u00A0' # 🛠️
|
||||
PROXY_ICON '\u2B82' # ⮂
|
||||
DOTNET_ICON '.NET'
|
||||
|
@ -216,6 +217,7 @@ function _p9k_init_icons() {
|
|||
LARAVEL_ICON ''
|
||||
RANGER_ICON '\u2B50' # ⭐
|
||||
MIDNIGHT_COMMANDER_ICON 'mc'
|
||||
VIM_ICON 'vim'
|
||||
TERRAFORM_ICON '\U1F6E0\u00A0' # 🛠️
|
||||
PROXY_ICON '\u2B82' # ⮂
|
||||
DOTNET_ICON '.NET'
|
||||
|
@ -324,6 +326,7 @@ function _p9k_init_icons() {
|
|||
LARAVEL_ICON ''
|
||||
RANGER_ICON '\u2B50' # ⭐
|
||||
MIDNIGHT_COMMANDER_ICON 'mc'
|
||||
VIM_ICON 'vim'
|
||||
TERRAFORM_ICON '\U1F6E0\u00A0' # 🛠️
|
||||
PROXY_ICON '\u2B82' # ⮂
|
||||
DOTNET_ICON '.NET'
|
||||
|
@ -429,6 +432,7 @@ function _p9k_init_icons() {
|
|||
LARAVEL_ICON '\ue73f' #
|
||||
RANGER_ICON '\u2B50' # ⭐
|
||||
MIDNIGHT_COMMANDER_ICON 'mc'
|
||||
VIM_ICON '\uE62B' #
|
||||
TERRAFORM_ICON '\U1F6E0\u00A0' # 🛠️
|
||||
PROXY_ICON '\u2B82' # ⮂
|
||||
DOTNET_ICON '\uE77F' #
|
||||
|
@ -533,6 +537,7 @@ function _p9k_init_icons() {
|
|||
LARAVEL_ICON ''
|
||||
RANGER_ICON '\u2B50' # ⭐
|
||||
MIDNIGHT_COMMANDER_ICON 'mc'
|
||||
VIM_ICON 'vim'
|
||||
TERRAFORM_ICON '\U1F6E0\u00A0' # 🛠️
|
||||
PROXY_ICON '\u2194' # ↔
|
||||
DOTNET_ICON '.NET'
|
||||
|
|
|
@ -3455,6 +3455,15 @@ function instant_prompt_midnight_commander() {
|
|||
_p9k_prompt_segment prompt_midnight_commander $_p9k_color1 yellow MIDNIGHT_COMMANDER_ICON 0 '$MC_TMPDIR' ''
|
||||
}
|
||||
|
||||
function prompt_vim_shell() {
|
||||
[[ -n $VIMRUNTIME ]] || return
|
||||
_p9k_prompt_segment $0 green $_p9k_color1 VIM_ICON 0 '' ''
|
||||
}
|
||||
|
||||
function instant_prompt_vim_shell() {
|
||||
_p9k_prompt_segment prompt_vim_shell green $_p9k_color1 VIM_ICON 0 '$VIMRUNTIME' ''
|
||||
}
|
||||
|
||||
function prompt_terraform() {
|
||||
(( $+commands[terraform] )) || return
|
||||
local ws=default
|
||||
|
@ -5376,7 +5385,7 @@ _p9k_must_init() {
|
|||
[[ $sig == $_p9k__param_sig ]] && return 1
|
||||
_p9k_deinit
|
||||
fi
|
||||
_p9k__param_pat=$'v12\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1'
|
||||
_p9k__param_pat=$'v13\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1'
|
||||
_p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1'
|
||||
_p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1'
|
||||
_p9k__param_pat+=$'$DEFAULT_USER\1${ZLE_RPROMPT_INDENT:-1}\1$P9K_SSH\1$__p9k_ksh_arrays'
|
||||
|
|
Loading…
Reference in a new issue