Add a visual bell to highlight tmux tabs upon command completion
This commit is contained in:
parent
e6d297a9d0
commit
833d03c416
1 changed files with 7 additions and 3 deletions
10
.bashrc
10
.bashrc
|
@ -82,7 +82,7 @@ if [ "$color_prompt" = yes ]; then
|
|||
context_color=$red
|
||||
prompt_symbol=💀
|
||||
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} "
|
||||
PS2="$chrome_color└>$color_off "
|
||||
|
||||
|
@ -150,8 +150,8 @@ fi
|
|||
|
||||
# Customizations
|
||||
|
||||
# Use tmux for local shells
|
||||
if [ -z "${SSH_CONNECTION}" ] && [ -z "${TERM_PROGRAM}" ]; then
|
||||
# Use tmux for local unelevated shells
|
||||
if [ -z "${SUDO_USER}" ] && [ -z "${SSH_CONNECTION}" ] && [ -z "${TERM_PROGRAM}" ]; then
|
||||
tmux new -A -s local_tmux
|
||||
fi
|
||||
|
||||
|
@ -179,3 +179,7 @@ PROMPT_COMMAND="${PROMPT_COMMAND};history -a"
|
|||
|
||||
# Cargo binary path
|
||||
[ -d "${HOME}/.cargo/bin" ] && export PATH="${PATH}:${HOME}/.cargo/bin"
|
||||
|
||||
# Funciton to notify after a long-running command
|
||||
alias bell="echo -e '\a'"
|
||||
|
||||
|
|
Loading…
Reference in a new issue