From 4bed6cd1bc86568f2422915ef2a618133a28c397 Mon Sep 17 00:00:00 2001 From: Jens Welsch <21183736-JensWelsch@users.noreply.gitlab.com> Date: Thu, 22 Jan 2026 12:02:58 +0100 Subject: [PATCH] Added option EXPERIMENTAL_TIME_REALTIME_INTERVAL --- config/p10k-classic.zsh | 6 ++++++ config/p10k-lean-8colors.zsh | 6 ++++++ config/p10k-lean.zsh | 6 ++++++ config/p10k-pure.zsh | 6 ++++++ config/p10k-rainbow.zsh | 6 ++++++ internal/p10k.zsh | 2 +- 6 files changed, 31 insertions(+), 1 deletion(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 623b9308..a23ccd03 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -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. diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 3f72ff4b..8a537bc3 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -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. diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index cef70fd8..7e0ad4e3 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -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. diff --git a/config/p10k-pure.zsh b/config/p10k-pure.zsh index 7a4d2441..ce2836e3 100644 --- a/config/p10k-pure.zsh +++ b/config/p10k-pure.zsh @@ -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: diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index ed74b7fa..3ca685db 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -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. diff --git a/internal/p10k.zsh b/internal/p10k.zsh index f73dd208..c0d4db4b 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -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() {