@ -1314,7 +1314,7 @@ function _p9k_fvm_old() {
}
function _p9k_fvm_new( ) {
_p9k_upglob .fvm/flutter_sdk @ && return 1
_p9k_upglob .fvm @ && return 1
local sdk = $_p9k__parent_dirs [ $? ] /.fvm/flutter_sdk
if [ [ ${ sdk : A } = = ( #b)*/versions/([^/]##) ]]; then
_p9k_prompt_segment prompt_fvm blue $_p9k_color1 FLUTTER_ICON 0 '' ${ match [1]// \% /%% }
@ -1410,9 +1410,6 @@ _p9k_prompt_battery_set_args() {
local -i is_full = 1 is_calculating is_charching
local dir
for dir in $bats ; do
_p9k_read_file $dir /status( N) && local bat_status = $_p9k__ret || continue
# Skip batteries with "Unknown" status: https://github.com/romkatv/powerlevel10k/pull/2562.
[ [ $bat_status = = Unknown ] ] && continue
local -i pow = 0 full = 0
if _p9k_read_file $dir /( energy_full| charge_full| charge_counter) ( N) ; then
( ( energy_full += ${ full : : =_p9k__ret } ) )
@ -1425,6 +1422,7 @@ _p9k_prompt_battery_set_args() {
elif _p9k_read_file $dir /( energy| charge) _now( N) ; then
( ( energy_now += _p9k__ret ) )
fi
_p9k_read_file $dir /status( N) && local bat_status = $_p9k__ret || continue
[ [ $bat_status != Full ] ] && is_full = 0
[ [ $bat_status = = Charging ] ] && is_charching = 1
[ [ $bat_status = = ( Charging| Discharging) && $pow = = 0 ] ] && is_calculating = 1
@ -4264,8 +4262,8 @@ function _p9k_parse_virtualenv_cfg() {
cfg = $( <$1 ) || return
local -a match mbegin mend
[ [ $'\n' $cfg $'\n' = = ( #b)*$'\n'prompt[$' \t']#= ([^$'\n']#) $'\n'* ]] || return
local res = ${ ${ match [1]##[ $' \t' ]# } %%[ $' \t' ]# }
[ [ $'\n' $cfg $'\n' = = ( #b)*$'\n'prompt[$' \t']#= [$' \t']#([^$' \t']#)[$' \t']# $'\n'* ]] || return
local res = $match [ 1]
if [ [ $res = = ( \" *\" | \' *\' ) ] ] ; then
# The string is quoted in python style, which isn't the same as quoting in zsh.
# For example, the literal 'foo"\'bar' denotes foo"'bar in python but in zsh
@ -4955,18 +4953,6 @@ function instant_prompt_ranger() {
_p9k_prompt_segment prompt_ranger $_p9k_color1 yellow RANGER_ICON 1 '$RANGER_LEVEL' '$RANGER_LEVEL'
}
function prompt_yazi( ) {
_p9k_prompt_segment $0 $_p9k_color1 yellow YAZI_ICON 0 '' $YAZI_LEVEL
}
_p9k_prompt_yazi_init( ) {
typeset -g " _p9k__segment_cond_ ${ _p9k__prompt_side } [_p9k__segment_index] " = '$YAZI_LEVEL'
}
function instant_prompt_yazi( ) {
_p9k_prompt_segment prompt_yazi $_p9k_color1 yellow YAZI_ICON 1 '$YAZI_LEVEL' '$YAZI_LEVEL'
}
function prompt_midnight_commander( ) {
local -i len = $# _p9k__prompt _p9k__has_upglob
_p9k_prompt_segment $0 $_p9k_color1 yellow MIDNIGHT_COMMANDER_ICON 0 '' ''
@ -5125,7 +5111,7 @@ function _p9k_timewarrior_clear() {
function prompt_timewarrior( ) {
local dir
[ [ -n ${ dir : : = $TIMEWARRIORDB } || -n ${ dir : : =~/.timewarrior } ( #q -/N ) ]] ||
[ [ -n ${ dir : : = $TIMEWARRIORDB } || -n ${ dir : : =~/.timewarrior } ( #q N/ ) ]] ||
dir = ${ XDG_DATA_HOME :- ~/.local/share } /timewarrior
dir += /data
local -a stat
@ -5234,10 +5220,7 @@ function _p9k_taskwarrior_check_data() {
}
function _p9k_taskwarrior_init_data( ) {
local -a stat files = (
$_p9k_taskwarrior_data_dir /{ pending,completed} .data
$_p9k_taskwarrior_data_dir /taskchampion.sqlite3
)
local -a stat files = ( $_p9k_taskwarrior_data_dir /{ pending,completed} .data)
_p9k_taskwarrior_data_files = ( $^files( N) )
_p9k_taskwarrior_data_non_files = ( ${ files : |_p9k_taskwarrior_data_files } )
if ( ( $# _p9k_taskwarrior_data_files ) ) ; then
@ -5264,9 +5247,7 @@ function _p9k_taskwarrior_init_data() {
local -a ts
ts = ( $( command task +PENDING -OVERDUE list rc.verbose= nothing rc.color= 0 rc._forcecolor= 0 \
rc.report.list.labels= rc.report.list.columns= due.epoch </dev/null 2>/dev/null) ) || ts = ( )
# The second condition is a workaround for a bug in taskwarrior v3.0.1.
# https://github.com/romkatv/powerlevel10k/issues/2648.
if ( ( $# ts && ! ${# ${ (@)ts : #(|-)<->(|.<->) } } ) ) ; then
if ( ( $# ts ) ) ; then
_p9k_taskwarrior_next_due = ${ ${ (on)ts } [1] }
( ( _p9k_taskwarrior_next_due > EPOCHSECONDS ) ) || _p9k_taskwarrior_next_due = $(( EPOCHSECONDS+60))
fi
@ -6740,9 +6721,9 @@ function _p9k_clear_instant_prompt() {
echo -E - ""
echo -E - " ${ (%) :- For details, see : } "
if ( ( _p9k_term_has_href ) ) ; then
echo - " ${ (%) :- \e ]8;;https : //github.com/romkatv/powerlevel10k #instant-prompt\a https : //github.com/romkatv/powerlevel10k #instant-prompt\e ]8;; \a } "
echo - " ${ (%) :- \e ]8;;https : //github.com/romkatv/powerlevel10k /blob/master/README.md #instant-prompt\a https : //github.com/romkatv/powerlevel10k /blob/master/README.md #instant-prompt\e ]8;; \a } "
else
echo - " ${ (%) :- https : //github.com/romkatv/powerlevel10k #instant-prompt} "
echo - " ${ (%) :- https : //github.com/romkatv/powerlevel10k /blob/master/README.md #instant-prompt} "
fi
echo -E - ""
echo - " ${ (%) :- %3F-- console output produced during zsh initialization follows --%f } "
@ -7473,7 +7454,7 @@ _p9k_init_params() {
'gnu.org' VCS_GIT_GNU_ICON
'kde.org' VCS_GIT_KDE_ICON
'kernel.org' VCS_GIT_LINUX_ICON
's r.ht' VCS_GIT_SOURCEHUT_ICON
's ourcehut.org' VCS_GIT_SOURCEHUT_ICON
)
typeset -ga _POWERLEVEL9K_VCS_GIT_REMOTE_ICONS
for domain icon in " ${ domain2icon [@] } " ; do
@ -8630,14 +8611,8 @@ function _p9k_init_cacheable() {
fi
case $os_release_id in
*arch*) _p9k_set_os Linux LINUX_ARCH_ICON; ;
*debian*) _p9k_set_os Linux LINUX_DEBIAN_ICON; ;
*raspbian*) _p9k_set_os Linux LINUX_RASPBIAN_ICON; ;
*debian*)
if [ [ -f /etc/apt/sources.list.d/raspi.list ] ] ; then
_p9k_set_os Linux LINUX_RASPBIAN_ICON
else
_p9k_set_os Linux LINUX_DEBIAN_ICON
fi
; ;
*ubuntu*) _p9k_set_os Linux LINUX_UBUNTU_ICON; ;
*elementary*) _p9k_set_os Linux LINUX_ELEMENTARY_ICON; ;
*fedora*) _p9k_set_os Linux LINUX_FEDORA_ICON; ;
@ -8662,7 +8637,6 @@ function _p9k_init_cacheable() {
endeavouros) _p9k_set_os Linux LINUX_ENDEAVOUROS_ICON; ;
rocky) _p9k_set_os Linux LINUX_ROCKY_ICON; ;
guix) _p9k_set_os Linux LINUX_GUIX_ICON; ;
neon) _p9k_set_os Linux LINUX_NEON_ICON; ;
*) _p9k_set_os Linux LINUX_ICON; ;
esac
; ;
@ -9007,9 +8981,9 @@ _p9k_init() {
>& 2 echo -E - ""
>& 2 echo -E - " ${ (%) :- - %BRecommended%b : Change the way Powerlevel10k is loaded from %B $__p9k_zshrc_u %b. } "
if ( ( _p9k_term_has_href ) ) ; then
>& 2 echo - " ${ (%) :- See \e ]8;;https : //github.com/romkatv/powerlevel10k #installation\a https : //github.com/romkatv/powerlevel10k #installation\e ]8;; \a . } "
>& 2 echo - " ${ (%) :- See \e ]8;;https : //github.com/romkatv/powerlevel10k /blob/master/README.md #installation\a https : //github.com/romkatv/powerlevel10k /blob/master/README.md #installation\e ]8;; \a . } "
else
>& 2 echo - " ${ (%) :- See https : //github.com/romkatv/powerlevel10k #installation.} "
>& 2 echo - " ${ (%) :- See https : //github.com/romkatv/powerlevel10k /blob/master/README.md #installation.} "
fi
if ( ( $+zsh_defer_options ) ) ; then
>& 2 echo -E - ""
@ -9483,7 +9457,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
fi
typeset -g P9K_VERSION = 1.20.10
typeset -g P9K_VERSION = 1.19.14
unset VSCODE_SHELL_INTEGRATION
_p9k_init_ssh