Compare commits

...

7 Commits

Author SHA1 Message Date
Faddeev-Popov 4410361846
Merge 8cc3298bac into 9253fb1c50 2026-06-15 14:41:57 -07:00
Roman Perepelitsa 9253fb1c50 fix a bug that triggers when SH_GLOB is set (#2887) 2026-06-15 09:54:55 +02:00
Faddeev-Popov 8cc3298bac update readme with vifm information 2025-06-11 04:18:35 -04:00
Faddeev-Popov 29fe575b3c add themes support for vifm 2025-06-11 04:18:29 -04:00
Faddeev-Popov ff6f434aa9 add visual expansion to wizard for vifm 2025-06-11 04:18:24 -04:00
Faddeev-Popov 9b3fc772e4 add prompt segment for vifm levels 2025-06-11 04:18:21 -04:00
Faddeev-Popov f049be947c add icon for vifm level 2025-06-11 04:17:43 -04:00
9 changed files with 72 additions and 7 deletions

View File

@ -364,6 +364,7 @@ You can enable as many segments as you like. It won't slow down your prompt or Z
| `ram` | free RAM | | `ram` | free RAM |
| `ranger` | [ranger](https://github.com/ranger/ranger) shell | | `ranger` | [ranger](https://github.com/ranger/ranger) shell |
| `yazi` | [yazi](https://github.com/sxyazi/yazi) shell | | `yazi` | [yazi](https://github.com/sxyazi/yazi) shell |
| `vifm` | [vifm](https://github.com/vifm/vifm) shell |
| `rbenv` | ruby environment from [rbenv](https://github.com/rbenv/rbenv) | | `rbenv` | ruby environment from [rbenv](https://github.com/rbenv/rbenv) |
| `rust_version` | [rustc](https://www.rust-lang.org) version | | `rust_version` | [rustc](https://www.rust-lang.org) version |
| `rvm` | ruby environment from [rvm](https://rvm.io) | | `rvm` | ruby environment from [rvm](https://rvm.io) |

View File

@ -82,6 +82,7 @@
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)
yazi # yazi shell (https://github.com/sxyazi/yazi) yazi # yazi shell (https://github.com/sxyazi/yazi)
vifm # vifm shell (https://github.com/vifm/vifm)
nnn # nnn shell (https://github.com/jarun/nnn) nnn # nnn shell (https://github.com/jarun/nnn)
lf # lf shell (https://github.com/gokcehan/lf) lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr) xplr # xplr shell (https://github.com/sayanarijit/xplr)
@ -737,6 +738,12 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'
####################[ vifm: vifm shell (https://github.com/vifm/vifm) ]#####################
# Vifm shell color.
typeset -g POWERLEVEL9K_VIFM_FOREGROUND=178
# Custom icon.
# typeset -g POWERLEVEL9K_VIFM_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color. # Nnn shell color.
typeset -g POWERLEVEL9K_NNN_FOREGROUND=72 typeset -g POWERLEVEL9K_NNN_FOREGROUND=72

View File

@ -82,6 +82,7 @@
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)
yazi # yazi shell (https://github.com/sxyazi/yazi) yazi # yazi shell (https://github.com/sxyazi/yazi)
vifm # vifm shell (https://github.com/vifm/vifm)
nnn # nnn shell (https://github.com/jarun/nnn) nnn # nnn shell (https://github.com/jarun/nnn)
lf # lf shell (https://github.com/gokcehan/lf) lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr) xplr # xplr shell (https://github.com/sayanarijit/xplr)
@ -728,6 +729,12 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'
####################[ vifm: vifm shell (https://github.com/vifm/vifm) ]#####################
# Vifm shell color.
typeset -g POWERLEVEL9K_VIFM_FOREGROUND=3
# Custom icon.
# typeset -g POWERLEVEL9K_VIFM_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color. # Nnn shell color.
typeset -g POWERLEVEL9K_NNN_FOREGROUND=3 typeset -g POWERLEVEL9K_NNN_FOREGROUND=3

View File

@ -82,6 +82,7 @@
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)
yazi # yazi shell (https://github.com/sxyazi/yazi) yazi # yazi shell (https://github.com/sxyazi/yazi)
vifm # vifm shell (https://github.com/vifm/vifm)
nnn # nnn shell (https://github.com/jarun/nnn) nnn # nnn shell (https://github.com/jarun/nnn)
lf # lf shell (https://github.com/gokcehan/lf) lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr) xplr # xplr shell (https://github.com/sayanarijit/xplr)
@ -728,6 +729,12 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'
####################[ vifm: vifm shell (https://github.com/vifm/vifm) ]#####################
# Vifm shell color.
typeset -g POWERLEVEL9K_VIFM_FOREGROUND=178
# Custom icon.
# typeset -g POWERLEVEL9K_VIFM_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color. # Nnn shell color.
typeset -g POWERLEVEL9K_NNN_FOREGROUND=72 typeset -g POWERLEVEL9K_NNN_FOREGROUND=72

View File

@ -82,6 +82,7 @@
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)
yazi # yazi shell (https://github.com/sxyazi/yazi) yazi # yazi shell (https://github.com/sxyazi/yazi)
vifm # vifm shell (https://github.com/vifm/vifm)
nnn # nnn shell (https://github.com/jarun/nnn) nnn # nnn shell (https://github.com/jarun/nnn)
lf # lf shell (https://github.com/gokcehan/lf) lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr) xplr # xplr shell (https://github.com/sayanarijit/xplr)
@ -757,6 +758,13 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'
####################[ vifm: vifm shell (https://github.com/vifm/vifm) ]#####################
# Vifm shell color.
typeset -g POWERLEVEL9K_VIFM_FOREGROUND=3
typeset -g POWERLEVEL9K_VIFM_BACKGROUND=0
# Custom icon.
# typeset -g POWERLEVEL9K_VIFM_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color. # Nnn shell color.
typeset -g POWERLEVEL9K_NNN_FOREGROUND=0 typeset -g POWERLEVEL9K_NNN_FOREGROUND=0

View File

@ -141,6 +141,7 @@ function _p9k_init_icons() {
LARAVEL_ICON '' LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐ RANGER_ICON '\u2B50' # ⭐
YAZI_ICON '\u2B50' # ⭐ YAZI_ICON '\u2B50' # ⭐
VIFM_ICON '\u2B50' # ⭐
MIDNIGHT_COMMANDER_ICON 'mc' MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim' VIM_ICON 'vim'
TERRAFORM_ICON 'tf' TERRAFORM_ICON 'tf'
@ -296,6 +297,7 @@ function _p9k_init_icons() {
LARAVEL_ICON '' LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐ RANGER_ICON '\u2B50' # ⭐
YAZI_ICON '\u2B50' # ⭐ YAZI_ICON '\u2B50' # ⭐
VIFM_ICON '\u2B50' # ⭐
MIDNIGHT_COMMANDER_ICON 'mc' MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim' VIM_ICON 'vim'
TERRAFORM_ICON 'tf' TERRAFORM_ICON 'tf'
@ -454,6 +456,7 @@ function _p9k_init_icons() {
LARAVEL_ICON '' LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐ RANGER_ICON '\u2B50' # ⭐
YAZI_ICON '\u2B50' # ⭐ YAZI_ICON '\u2B50' # ⭐
VIFM_ICON '\u2B50' # ⭐
MIDNIGHT_COMMANDER_ICON 'mc' MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim' VIM_ICON 'vim'
TERRAFORM_ICON 'tf' TERRAFORM_ICON 'tf'
@ -615,6 +618,7 @@ function _p9k_init_icons() {
LARAVEL_ICON '\ue73f'$q #  LARAVEL_ICON '\ue73f'$q # 
RANGER_ICON '\uF00b ' #  RANGER_ICON '\uF00b ' # 
YAZI_ICON '\uF00b ' #  YAZI_ICON '\uF00b ' # 
VIFM_ICON '\uF00b ' # 
MIDNIGHT_COMMANDER_ICON 'mc' # mc MIDNIGHT_COMMANDER_ICON 'mc' # mc
VIM_ICON '\uE62B' #  VIM_ICON '\uE62B' # 
TERRAFORM_ICON '\uF1BB ' #  TERRAFORM_ICON '\uF1BB ' # 
@ -771,6 +775,7 @@ function _p9k_init_icons() {
LARAVEL_ICON '\ue73f'$q #  LARAVEL_ICON '\ue73f'$q # 
RANGER_ICON '\uF00b ' #  RANGER_ICON '\uF00b ' # 
YAZI_ICON '\uF00b ' #  YAZI_ICON '\uF00b ' # 
VIFM_ICON 'vifm' # vifm
MIDNIGHT_COMMANDER_ICON 'mc' MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON '\uE62B' #  VIM_ICON '\uE62B' # 
TERRAFORM_ICON '\uF1BB ' #  TERRAFORM_ICON '\uF1BB ' # 
@ -924,6 +929,7 @@ function _p9k_init_icons() {
LARAVEL_ICON '' LARAVEL_ICON ''
RANGER_ICON 'ranger' RANGER_ICON 'ranger'
YAZI_ICON 'yazi' YAZI_ICON 'yazi'
VIFM_ICON 'vifm'
MIDNIGHT_COMMANDER_ICON 'mc' MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim' VIM_ICON 'vim'
TERRAFORM_ICON 'tf' TERRAFORM_ICON 'tf'
@ -1079,6 +1085,7 @@ function _p9k_init_icons() {
LARAVEL_ICON '' LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐ RANGER_ICON '\u2B50' # ⭐
YAZI_ICON '\u2B50' # ⭐ YAZI_ICON '\u2B50' # ⭐
VIFM_ICON '\u2B50' # ⭐
MIDNIGHT_COMMANDER_ICON 'mc' MIDNIGHT_COMMANDER_ICON 'mc'
VIM_ICON 'vim' VIM_ICON 'vim'
TERRAFORM_ICON 'tf' TERRAFORM_ICON 'tf'

View File

@ -138,6 +138,14 @@ function getColorCode() {
return 1 return 1
} }
function _p9k_codeset_is_utf8() {
# Use `case` to survive SH_GLOB.
case "${langinfo[CODESET]}" in
utf-8|UTF-8|utf8|UTF8) return 0;;
*) return 1;;
esac
}
# _p9k_declare <type> <uppercase-name> [default]... # _p9k_declare <type> <uppercase-name> [default]...
function _p9k_declare() { function _p9k_declare() {
local -i set=$+parameters[$2] local -i set=$+parameters[$2]
@ -1796,7 +1804,7 @@ prompt_dir() {
if (( $+_POWERLEVEL9K_SHORTEN_DELIMITER )); then if (( $+_POWERLEVEL9K_SHORTEN_DELIMITER )); then
local delim=$_POWERLEVEL9K_SHORTEN_DELIMITER local delim=$_POWERLEVEL9K_SHORTEN_DELIMITER
else else
if [[ $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then if _p9k_codeset_is_utf8; then
local delim=$'\u2026' local delim=$'\u2026'
else else
local delim='..' local delim='..'
@ -4975,6 +4983,18 @@ function instant_prompt_yazi() {
_p9k_prompt_segment prompt_yazi $_p9k_color1 yellow YAZI_ICON 1 '$YAZI_LEVEL' '$YAZI_LEVEL' _p9k_prompt_segment prompt_yazi $_p9k_color1 yellow YAZI_ICON 1 '$YAZI_LEVEL' '$YAZI_LEVEL'
} }
function prompt_vifm() {
_p9k_prompt_segment $0 $_p9k_color1 yellow VIFM_ICON 0 '' $VIFM_LEVEL
}
_p9k_prompt_vifm_init() {
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$VIFM_LEVEL'
}
function instant_prompt_vifm() {
_p9k_prompt_segment prompt_vifm $_p9k_color1 yellow VIFM_ICON 1 '$VIFM_LEVEL' '$VIFM_LEVEL'
}
function prompt_midnight_commander() { function prompt_midnight_commander() {
local -i len=$#_p9k__prompt _p9k__has_upglob local -i len=$#_p9k__prompt _p9k__has_upglob
_p9k_prompt_segment $0 $_p9k_color1 yellow MIDNIGHT_COMMANDER_ICON 0 '' '' _p9k_prompt_segment $0 $_p9k_color1 yellow MIDNIGHT_COMMANDER_ICON 0 '' ''
@ -6851,13 +6871,13 @@ function _p9k_restore_special_params() {
} }
function _p9k_on_expand() { function _p9k_on_expand() {
(( _p9k__expanded && ! ${+__p9k_instant_prompt_active} )) && [[ "${langinfo[CODESET]}" == (utf|UTF)(-|)8 ]] && return (( _p9k__expanded && ! ${+__p9k_instant_prompt_active} )) && _p9k_codeset_is_utf8 && return
eval "$__p9k_intro_no_locale" eval "$__p9k_intro_no_locale"
if [[ $langinfo[CODESET] != (utf|UTF)(-|)8 ]]; then if ! _p9k_codeset_is_utf8; then
_p9k_restore_special_params _p9k_restore_special_params
if [[ $langinfo[CODESET] != (utf|UTF)(-|)8 ]] && _p9k_init_locale; then if ! _p9k_codeset_is_utf8 && _p9k_init_locale; then
if [[ -n $LC_ALL ]]; then if [[ -n $LC_ALL ]]; then
_p9k__real_lc_all=$LC_ALL _p9k__real_lc_all=$LC_ALL
LC_ALL=$__p9k_locale LC_ALL=$__p9k_locale
@ -7458,7 +7478,7 @@ _p9k_init_params() {
_p9k_declare -i POWERLEVEL9K_VCS_SHORTEN_LENGTH _p9k_declare -i POWERLEVEL9K_VCS_SHORTEN_LENGTH
_p9k_declare -i POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH _p9k_declare -i POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH
_p9k_declare -s POWERLEVEL9K_VCS_SHORTEN_STRATEGY _p9k_declare -s POWERLEVEL9K_VCS_SHORTEN_STRATEGY
if [[ $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then if _p9k_codeset_is_utf8; then
_p9k_declare -e POWERLEVEL9K_VCS_SHORTEN_DELIMITER '\u2026' _p9k_declare -e POWERLEVEL9K_VCS_SHORTEN_DELIMITER '\u2026'
else else
_p9k_declare -e POWERLEVEL9K_VCS_SHORTEN_DELIMITER '..' _p9k_declare -e POWERLEVEL9K_VCS_SHORTEN_DELIMITER '..'
@ -9519,7 +9539,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p
zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null
fi fi
typeset -g P9K_VERSION=1.20.16 typeset -g P9K_VERSION=1.20.17
if [[ ${VSCODE_SHELL_INTEGRATION-} == <1-> && ${+__p9k_force_term_shell_integration} == 0 ]]; then if [[ ${VSCODE_SHELL_INTEGRATION-} == <1-> && ${+__p9k_force_term_shell_integration} == 0 ]]; then
typeset -gri __p9k_force_term_shell_integration=1 typeset -gri __p9k_force_term_shell_integration=1

View File

@ -1750,6 +1750,8 @@ function generate_config() {
sub RANGER_VISUAL_IDENTIFIER_EXPANSION "'▲'" sub RANGER_VISUAL_IDENTIFIER_EXPANSION "'▲'"
uncomment 'typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION' uncomment 'typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION'
sub YAZI_VISUAL_IDENTIFIER_EXPANSION "'▲'" sub YAZI_VISUAL_IDENTIFIER_EXPANSION "'▲'"
uncomment 'typeset -g POWERLEVEL9K_VIFM_VISUAL_IDENTIFIER_EXPANSION'
sub VIFM_VISUAL_IDENTIFIER_EXPANSION "'▲'"
uncomment 'typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION' uncomment 'typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION'
sub KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION "'○'" sub KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION "'○'"
uncomment 'typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION' uncomment 'typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION'

View File

@ -27,7 +27,13 @@
local -a match mbegin mend local -a match mbegin mend
local -i MBEGIN MEND OPTIND local -i MBEGIN MEND OPTIND
local MATCH OPTARG IFS=$'\'' \t\n\0'\' local MATCH OPTARG IFS=$'\'' \t\n\0'\'
typeset -gr __p9k_intro_locale='[[ $langinfo[CODESET] != (utf|UTF)(-|)8 ]] && _p9k_init_locale && { [[ -n $LC_ALL ]] && local LC_ALL=$__p9k_locale || local LC_CTYPE=$__p9k_locale }' # Use `case` to survive SH_GLOB.
typeset -gr __p9k_intro_locale='{
case "${langinfo[CODESET]}" in
utf-8|UTF-8|utf8|UTF8) false;;
*) true;;
esac
} && _p9k_init_locale && { [[ -n "$LC_ALL" ]] && local LC_ALL=$__p9k_locale || local LC_CTYPE=$__p9k_locale }'
typeset -gr __p9k_intro_no_locale="${${__p9k_intro_base/ match / match reply }/ MATCH / MATCH REPLY }" typeset -gr __p9k_intro_no_locale="${${__p9k_intro_base/ match / match reply }/ MATCH / MATCH REPLY }"
typeset -gr __p9k_intro_no_reply="$__p9k_intro_base; $__p9k_intro_locale" typeset -gr __p9k_intro_no_reply="$__p9k_intro_base; $__p9k_intro_locale"
typeset -gr __p9k_intro="$__p9k_intro_no_locale; $__p9k_intro_locale" typeset -gr __p9k_intro="$__p9k_intro_no_locale; $__p9k_intro_locale"