summaryrefslogtreecommitdiff
path: root/config/p10k-lean.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-07-20 02:25:28 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-07-20 02:25:28 +0300
commit2683653ed2269f53ab0f164637cf91ba7643a331 (patch)
tree5309413f7cf347617935840753a3697918b50256 /config/p10k-lean.zsh
parent36ee1ab9b7bc38956697a1c60e0cf1049aa9ca81 (diff)
tune command_execution_time
Diffstat (limited to 'config/p10k-lean.zsh')
-rw-r--r--config/p10k-lean.zsh8
1 files changed, 6 insertions, 2 deletions
diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh
index e1ee8da3..3c388e27 100644
--- a/config/p10k-lean.zsh
+++ b/config/p10k-lean.zsh
@@ -202,12 +202,16 @@ fi
# Show signals as "INT", "ABORT", "KILL", etc.
typeset -g POWERLEVEL9K_STATUS_ERROR_CONTENT_EXPANSION='${${P9K_CONTENT#SIG}//[!A-Z]}'
- # Show execution time of the last command if takes longer than this many seconds.
- typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=5
+ # Show duration of the last command if takes longer than this many seconds.
+ typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3
# Show this many fractional digits. Zero means round to seconds.
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
# Execution time color.
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101
+ # Duration format: 1h 2m 3s.
+ local d='${${P9K_CONTENT:/(#b)(*):(*):(*)/${match[1]#0}h ${match[2]#0}m ${match[3]#0}s}'
+ d+=':/(#b)(*):(*)/${match[1]#0}m ${match[2]#0}s}'
+ typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_CONTENT_EXPANSION=$d
# Don't show the number of background jobs.
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false