Add a visual bell to highlight tmux tabs upon command completion

This commit is contained in:
Daniel McKnight 2025-05-16 17:49:58 -07:00
parent e6d297a9d0
commit 833d03c416

10
.bashrc
View file

@ -82,7 +82,7 @@ if [ "$color_prompt" = yes ]; then
context_color=$red context_color=$red
prompt_symbol=💀 prompt_symbol=💀
fi fi
PROMPT_COMMAND='if [[ $? != 0 && $? != 130 ]];then echo "⚠️";fi' PROMPT_COMMAND='if [[ $? != 0 && $? != 130 ]];then echo -e "⚠️\a";else echo -e "\a";fi'
PS1="$chrome_color┌──"'${debian_chroot:+('${path_color}'$debian_chroot'${chrome_color}')─}${VIRTUAL_ENV:+('${path_color}'$(realpath $VIRTUAL_ENV --relative-to $PWD --relative-base /home)'${chrome_color}')─}'"[${context_color}\u${chrome_color}${prompt_symbol}${context_color}\h${chrome_color}]─(${path_color}\w${chrome_color})\n${chrome_color}${context_color}${prompt}${color_off} " PS1="$chrome_color┌──"'${debian_chroot:+('${path_color}'$debian_chroot'${chrome_color}')─}${VIRTUAL_ENV:+('${path_color}'$(realpath $VIRTUAL_ENV --relative-to $PWD --relative-base /home)'${chrome_color}')─}'"[${context_color}\u${chrome_color}${prompt_symbol}${context_color}\h${chrome_color}]─(${path_color}\w${chrome_color})\n${chrome_color}${context_color}${prompt}${color_off} "
PS2="$chrome_color└>$color_off " PS2="$chrome_color└>$color_off "
@ -150,8 +150,8 @@ fi
# Customizations # Customizations
# Use tmux for local shells # Use tmux for local unelevated shells
if [ -z "${SSH_CONNECTION}" ] && [ -z "${TERM_PROGRAM}" ]; then if [ -z "${SUDO_USER}" ] && [ -z "${SSH_CONNECTION}" ] && [ -z "${TERM_PROGRAM}" ]; then
tmux new -A -s local_tmux tmux new -A -s local_tmux
fi fi
@ -179,3 +179,7 @@ PROMPT_COMMAND="${PROMPT_COMMAND};history -a"
# Cargo binary path # Cargo binary path
[ -d "${HOME}/.cargo/bin" ] && export PATH="${PATH}:${HOME}/.cargo/bin" [ -d "${HOME}/.cargo/bin" ] && export PATH="${PATH}:${HOME}/.cargo/bin"
# Funciton to notify after a long-running command
alias bell="echo -e '\a'"