diff options
Diffstat (limited to '.bashrc')
-rw-r--r-- | .bashrc | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -10,6 +10,9 @@ alias cp="cp -i" export history_control=ignoreboth export command_oriented_history export HISTIGNORE='&:[bf]g:exit:ls' + +export LESSCOLORIZER='pygmentize -O bg=dark,style=github-dark -f terminal16m' + shopt -s extglob shopt -s cmdhist shopt -s histappend @@ -26,4 +29,23 @@ if ! shopt -oq posix; then fi fi -. ~/src/git-prompt/git-prompt.sh +function xtitle() { + case $TERM in + xterm*|rxvt*|Eterm|eterm|alacritty) + echo -ne "\e]0;$1\007" + ;; + screen) + echo -ne "\e_$1\e\\" + ;; + esac +} + +function starship_set_win_title() { + local cwd="${PWD/$HOME/\~}" + cwd="${cwd##[/~]*/}/" + + xtitle "$USER@$(hostname):$cwd" +} +starship_precmd_user_func=starship_set_win_title +eval "$(starship init bash)" + |