Added option EXPERIMENTAL_TIME_REALTIME_INTERVAL

This commit is contained in:
Jens Welsch 2026-01-22 12:02:58 +01:00
commit 4bed6cd1bc
No known key found for this signature in database
6 changed files with 31 additions and 1 deletions

View file

@ -1662,6 +1662,12 @@
# commands will contain the start times of their commands as opposed to the default
# behavior where they contain the end times of their preceding commands.
typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
# Updates the active commandline at a regular interval (Every second by default)
# to keep the clock syncronized. This feature is experimental and may have
# unintended side effects.
# typeset -g POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME=true
# Change the update frequency of the realtime clock
# typeset -g POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL=1
# Custom icon.
# typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'
# Custom prefix.

View file

@ -1637,6 +1637,12 @@
# commands will contain the start times of their commands as opposed to the default
# behavior where they contain the end times of their preceding commands.
typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
# Updates the active commandline at a regular interval (Every second by default)
# to keep the clock syncronized. This feature is experimental and may have
# unintended side effects.
# typeset -g POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME=true
# Change the update frequency of the realtime clock
# typeset -g POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL=1
# Custom icon.
# typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'
# Custom prefix.

View file

@ -548,6 +548,12 @@
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101
# Duration format: 1d 2h 3m 4s.
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'
# Updates the active commandline at a regular interval (Every second by default)
# to keep the clock syncronized. This feature is experimental and may have
# unintended side effects.
# typeset -g POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME=true
# Change the update frequency of the realtime clock
# typeset -g POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL=1
# Custom icon.
# typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'
# Custom prefix.

View file

@ -153,6 +153,12 @@
# commands will contain the start times of their commands rather than the end times of
# their preceding commands.
typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
# Updates the active commandline at a regular interval (Every second by default)
# to keep the clock syncronized. This feature is experimental and may have
# unintended side effects.
# typeset -g POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME=true
# Change the update frequency of the realtime clock
# typeset -g POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL=1
# Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt
# when accepting a command line. Supported values:

View file

@ -1758,6 +1758,12 @@
# commands will contain the start times of their commands as opposed to the default
# behavior where they contain the end times of their preceding commands.
typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
# Updates the active commandline at a regular interval (Every second by default)
# to keep the clock syncronized. This feature is experimental and may have
# unintended side effects.
# typeset -g POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME=true
# Change the update frequency of the realtime clock
# typeset -g POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL=1
# Custom icon.
# typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'
# Custom prefix.

View file

@ -3527,7 +3527,7 @@ _p9k_prompt_time_compute() {
}
_p9k_prompt_time_async() {
sleep 1 || true
sleep $POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL || true
}
_p9k_prompt_time_sync() {