Push window title until later to have more details

This commit is contained in:
John Mertz 2024-01-31 22:31:31 -07:00
parent a28908640e
commit 5389a1e484
1 changed files with 9 additions and 8 deletions

View File

@ -34,20 +34,12 @@ if [[ -z $TERM_TITLE ]]; then
TERM_TITLE="$TERM"; TERM_TITLE="$TERM";
fi fi
PS0='\[\e]0;$(last_command) - $TERM_TITLE\a\]'
# Update prompt
PROMPT_COMMAND="source ${HOME}/.dotfiles/bash/prompt.sh"
# Bell when prompt is returned to mark as urgent
PROMPT_COMMAND="$PROMPT_COMMAND;printf \"\a\"; history -a"
# Load aliases # Load aliases
if [ -f ${HOME}/.dotfiles/bash/bash_aliases ]; then if [ -f ${HOME}/.dotfiles/bash/bash_aliases ]; then
. "${HOME}/.dotfiles/bash/bash_aliases" . "${HOME}/.dotfiles/bash/bash_aliases"
fi fi
# Set initial title
echo -e -n "\033]2;Welcome to Bash\007"
# Perl # Perl
eval "$(plenv init -)" eval "$(plenv init -)"
source ${HOME}/.dotfiles/bash/plenv-path.sh source ${HOME}/.dotfiles/bash/plenv-path.sh
@ -63,6 +55,15 @@ source ~/perl5/perlbrew/etc/bashrc
. "$HOME/.cargo/env" . "$HOME/.cargo/env"
# Hide errors # Hide errors
clear clear
# Set window title to last command
PS0='\[\e]0;$(last_command) - $TERM_TITLE\a\]'
# Update prompt
PROMPT_COMMAND="source ${HOME}/.dotfiles/bash/prompt.sh"
# Bell when prompt is returned to mark as urgent
PROMPT_COMMAND="$PROMPT_COMMAND;printf \"\a\""
# Append previous command to history immediately
PROMPT_COMMAND="$PROMPT_COMMAND;history -a"
if [[ -n "$(which fastfetch 2> /dev/null)" ]]; then if [[ -n "$(which fastfetch 2> /dev/null)" ]]; then
if [ -n $DISTROBOX ] && [ -e ${HOME}/.dotfiles/fastfetch/${DISTROBOX}.jsonc ]; then if [ -n $DISTROBOX ] && [ -e ${HOME}/.dotfiles/fastfetch/${DISTROBOX}.jsonc ]; then
fastfetch -C ${HOME}/.dotfiles/fastfetch/${DISTROBOX}.jsonc fastfetch -C ${HOME}/.dotfiles/fastfetch/${DISTROBOX}.jsonc