summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2023-10-13 09:47:26 +0000
committerdakkar <dakkar@thenautilus.net>2023-10-13 09:47:26 +0000
commit2cc456b3075043d0b79cc6d50e142c29b5567228 (patch)
treea3cfc3d71b87622d5d68580eedba09611e267092
parentstarship config (diff)
downloaddotfiles-2cc456b3075043d0b79cc6d50e142c29b5567228.tar.gz
dotfiles-2cc456b3075043d0b79cc6d50e142c29b5567228.tar.bz2
dotfiles-2cc456b3075043d0b79cc6d50e142c29b5567228.zip
add xtitle
-rw-r--r--.bashrc11
1 files changed, 11 insertions, 0 deletions
diff --git a/.bashrc b/.bashrc
index 513cd59..0102b86 100644
--- a/.bashrc
+++ b/.bashrc
@@ -26,6 +26,17 @@ if ! shopt -oq posix; then
fi
fi
+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##[/~]*/}/"