summaryrefslogtreecommitdiff
path: root/config/essentials/zsh
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-04-23 23:49:32 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-04-23 23:49:32 +0200
commit3db0e5a18af4b06fe70edc0b13bc93c2c4d4df06 (patch)
tree5439493c4b7c61aa381557e93567d67e98b55ca4 /config/essentials/zsh
parent74eb06cc900feee47d812407280c2d2d701479e4 (diff)
added window title
Diffstat (limited to 'config/essentials/zsh')
-rw-r--r--config/essentials/zsh/.zshrc4
1 files changed, 4 insertions, 0 deletions
diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc
index afe1eb6..6fc601c 100644
--- a/config/essentials/zsh/.zshrc
+++ b/config/essentials/zsh/.zshrc
@@ -83,6 +83,10 @@ add-zsh-hook -Uz precmd rehash_precmd
PS1=' %B%(#.%F{1}.%F{13})[%n%b%f@%B%F{6}%m]%b%f %3~ '
RPROMPT='%F{blue}$(parse_git_remote)%f%F{red}$(parse_git_status)%f%F{green}$(parse_git_branch)%f%(?.. %?)'
+precmd () {
+ print -Pn "\e]0;$USER@$HOST on ${PWD//$HOME/\~}\a"
+}
+
setopt prompt_subst
parse_git_remote() {
b="$(git branch -v 2> /dev/null | grep "^*" | sed 's/.\+\[\([^ ]\+\).*$/\1/')"