From d8802346ea14965b3f714dbba632a27dbc25c9ad Mon Sep 17 00:00:00 2001 From: ewin Date: Fri, 28 Mar 2025 07:53:10 -0400 Subject: [PATCH] zsh: bell when a long command finishes --- zsh/.config/zsh/config.d/30_prompts.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zsh/.config/zsh/config.d/30_prompts.zsh b/zsh/.config/zsh/config.d/30_prompts.zsh index a1c2f48..ce2b0ee 100644 --- a/zsh/.config/zsh/config.d/30_prompts.zsh +++ b/zsh/.config/zsh/config.d/30_prompts.zsh @@ -77,6 +77,11 @@ function build_rprompt { timer_show=$(printf '%.*f\n' 3 $timer_show) RPROMPT="took %B%F{cyan}${timer_show}s%f%b, $RPROMPT" fi + # if the command took a *really* long time, play a bell when it's + # done + if [[ $(($now - $rprompt_exec_timer)) > 15 ]]; then + tput bel + fi fi fi