diff --git a/zsh/prompt.zsh b/zsh/prompt.zsh new file mode 100644 index 0000000..30d66d8 --- /dev/null +++ b/zsh/prompt.zsh @@ -0,0 +1,10 @@ +setopt nopromptbang prompt{cr,percent,sp,subst} + +zstyle ':zim:duration-info' threshold 0.5 +zstyle ':zim:duration-info' format '%.4d s' + +autoload -Uz add-zsh-hook +add-zsh-hook preexec duration-info-preexec +add-zsh-hook precmd duration-info-precmd + +RPS1='${duration_info}%' diff --git a/zsh/zimrc b/zsh/zimrc index 783a554..c8d7893 100644 --- a/zsh/zimrc +++ b/zsh/zimrc @@ -5,6 +5,7 @@ zmodule termtitle zmodule utility zmodule completion zmodule git-info +zmodule duration-info zmodule prompt-pwd zmodule magicmace zmodule zsh-users/zsh-completions diff --git a/zsh/zshrc b/zsh/zshrc index 38a29f2..7e96646 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -12,4 +12,4 @@ fi autopair-init source ~/.zim/modules/fzf-tab/fzf-tab.plugin.zsh - +source ~/.config/zsh/prompt.zsh