@ -5125,7 +5125,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
@ -5264,7 +5264,9 @@ 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 = ( )
if ( ( $# ts ) ) ; then
# 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
_p9k_taskwarrior_next_due = ${ ${ (on)ts } [1] }
( ( _p9k_taskwarrior_next_due > EPOCHSECONDS ) ) || _p9k_taskwarrior_next_due = $(( EPOCHSECONDS+60))
fi
@ -5312,8 +5314,7 @@ prompt_wifi() {
_p9k_prompt_wifi_init( ) {
if [ [ -x /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport ||
-r /proc/net/wireless && -n $commands [ iw] ] ] ||
( ( _POWERLEVEL9K_USE_DANGEROUS_TERMUX_API && $+commands[ termux-wifi-connectioninfo] ) ) ; then
-r /proc/net/wireless && -n $commands [ iw] ] ] ; then
typeset -g _p9k__wifi_on =
typeset -g P9K_WIFI_LAST_TX_RATE =
typeset -g P9K_WIFI_SSID =
@ -5389,33 +5390,6 @@ _p9k_prompt_wifi_async() {
fi
done
[ [ -n $ssid && -n $last_tx_rate ] ] || return 0
# Output example (https://wiki.termux.com/wiki/Termux-wifi-connectioninfo):
#
# {
# "bssid": "02:00:00:00:00:00",
# "frequency_mhz": 2412,
# "ip": "100.64.135.224",
# "link_speed_mbps": 117,
# "mac_address": "02:00:00:00:00:00",
# "network_id": -1,
# "rssi": -65,
# "ssid": "<unknown ssid>",
# "ssid_hidden": true,
# "supplicant_state": "COMPLETED"
# }
elif ( ( _POWERLEVEL9K_USE_DANGEROUS_TERMUX_API && $+commands[ termux-wifi-connectioninfo] ) ) ; then
local json
json = $( command termux-wifi-connectioninfo) || return 0
[ [ $json = = *'"supplicant_state"' [ [ :space:] ] #:[[:space:]]#'"COMPLETED"' ]] || return 0
local -a match mbegin mend
[ [ $json = = ( #b)*'"rssi"'[[:space:]]#:[[:space:]]#(()) ]] || return 0
on = 1
rssi = $( jq -nr " $info | .rssi " )
last_tx_rate = $( jq -nr " $info | .link_speed_mbps " )
if [ [ $( jq -nr " $info | .ssid_hidden " ) = = false ] ] ; then
ssid = $( jq -nr " $info | .ssid " )
fi
else
return 0
fi
@ -6766,9 +6740,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 /blob/master/README.md #instant-prompt\a https : //github.com/romkatv/powerlevel10k /blob/master/README.md #instant-prompt\e ]8;; \a } "
echo - " ${ (%) :- \e ]8;;https : //github.com/romkatv/powerlevel10k #instant-prompt\a https : //github.com/romkatv/powerlevel10k #instant-prompt\e ]8;; \a } "
else
echo - " ${ (%) :- https : //github.com/romkatv/powerlevel10k /blob/master/README.md #instant-prompt} "
echo - " ${ (%) :- https : //github.com/romkatv/powerlevel10k #instant-prompt} "
fi
echo -E - ""
echo - " ${ (%) :- %3F-- console output produced during zsh initialization follows --%f } "
@ -7459,10 +7433,6 @@ _p9k_init_params() {
_p9k_declare -i POWERLEVEL9K_INSTANT_PROMPT_COMMAND_LINES
_p9k_declare -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS -- context dir vcs
_p9k_declare -a POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS -- status root_indicator background_jobs history time
# By default, powerlevel10k won't invoke Termux API utilities because
# they can hang. See https://github.com/termux/termux-packages/issues/334.
# This option allows powerlevel10k to make these calls.
_p9k_declare -b POWERLEVEL9K_USE_DANGEROUS_TERMUX_API 0
_p9k_declare -b POWERLEVEL9K_DISABLE_RPROMPT 0
_p9k_declare -b POWERLEVEL9K_PROMPT_ADD_NEWLINE 0
_p9k_declare -b POWERLEVEL9K_PROMPT_ON_NEWLINE 0
@ -9037,9 +9007,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 /blob/master/README.md #installation\a https : //github.com/romkatv/powerlevel10k /blob/master/README.md #installation\e ]8;; \a . } "
>& 2 echo - " ${ (%) :- See \e ]8;;https : //github.com/romkatv/powerlevel10k #installation\a https : //github.com/romkatv/powerlevel10k #installation\e ]8;; \a . } "
else
>& 2 echo - " ${ (%) :- See https : //github.com/romkatv/powerlevel10k /blob/master/README.md #installation.} "
>& 2 echo - " ${ (%) :- See https : //github.com/romkatv/powerlevel10k #installation.} "
fi
if ( ( $+zsh_defer_options ) ) ; then
>& 2 echo -E - ""
@ -9513,7 +9483,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.8
typeset -g P9K_VERSION = 1.20.10
unset VSCODE_SHELL_INTEGRATION
_p9k_init_ssh