diff options
| author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-24 12:43:30 +0200 | 
|---|---|---|
| committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-24 12:43:30 +0200 | 
| commit | a95eb39726cadb56e9fed8825c170118c8d69116 (patch) | |
| tree | 0a06e6210a9b46aa3a16c6e3cd2461284d6b3f8b /config/essentials | |
| parent | 66bec1babd8c2eb437c4ccdcbe2d2d386b1b664b (diff) | |
moved hooks together
Diffstat (limited to 'config/essentials')
| -rw-r--r-- | config/essentials/zsh/.zshrc | 13 | 
1 files changed, 7 insertions, 6 deletions
diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 3f9bd76..5ce6d01 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -65,7 +65,7 @@ bindkey "^Xe" edit-command-line  bindkey "^[." insert-last-word  bindkey "^['" quote-line -# pacman synced rehash +# rehash hook  zshcache_time="$(date +%s%N)"  autoload -Uz add-zsh-hook  rehash_precmd() { @@ -77,12 +77,8 @@ rehash_precmd() {      fi    fi  } +# window title hooks  add-zsh-hook -Uz precmd rehash_precmd - -# prompt -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%(?.. %?)' -  set_wt_action () {  	print -Pn "\e]0;$USER@$HOST on ${PWD//$HOME/\~} | $1\a"  } @@ -92,6 +88,11 @@ set_wt () {  }  add-zsh-hook -Uz precmd set_wt + +# prompt +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%(?.. %?)' +  setopt prompt_subst  parse_git_remote() {  	b="$(git branch -v 2> /dev/null | grep "^*" | sed 's/.\+\[\([^ ]\+\).*$/\1/')"  | 
