From 298032e572bacce27e7b2ddd645e0583a6949f9d Mon Sep 17 00:00:00 2001 From: Von Random Date: Wed, 19 Apr 2017 14:19:39 +0300 Subject: [PATCH] more zsh tweaks --- vimplugins | 1 - zshrc | 14 +++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/vimplugins b/vimplugins index 734fb87..d5da82c 100644 --- a/vimplugins +++ b/vimplugins @@ -16,7 +16,6 @@ Plug 'junegunn/vim-easy-align' Plug 'mhinz/vim-signify' Plug 'tpope/vim-fugitive' Plug 'tpope/vim-rsi' -Plug 'tpope/vim-sleuth' Plug 'tpope/vim-vinegar' Plug 'vimwiki/vimwiki' diff --git a/zshrc b/zshrc index cf192af..a005f79 100644 --- a/zshrc +++ b/zshrc @@ -42,9 +42,9 @@ if [[ -n ${vcs_enabled} ]]; then autoload -Uz vcs_info zstyle ':vcs_info:*' enable git zstyle ':vcs_info:*' check-for-changes true - zstyle ':vcs_info:*' stagedstr " %F{2}~%f" - zstyle ':vcs_info:*' unstagedstr " %F{1}-%f" - zstyle ':vcs_info:*' formats " { %B%F{12}%r%f%%b %F{3}%b%f%u%c }" + zstyle ':vcs_info:*' stagedstr " %F{green}~%f" + zstyle ':vcs_info:*' unstagedstr " %F{red}-%f" + zstyle ':vcs_info:*' formats " { %F{blue}%r%f %F{yellow}%b%f%u%c }" fi export MYSQL_PS1="mysql [\d]> " @@ -71,6 +71,14 @@ prompt_cwd='%B%d%b' prompt_bang='%B%(!.%F{red}>%f.>)%b ' prompt_jobs='%(1j. jobs:%B%F{red}%j%f%b.)' precmd() { + case ${TERM} in + xterm*|rxvt*) + printf "\033]0;%s@%s\007" "${USER}" "${HOST%%.*}" + ;; + screen*|tmux) + printf "\033k%s@%s\033\\" "${USER}" "${HOST%%.*}" + ;; + esac [[ -n ${vcs_enabled} ]] && vcs_info PROMPT="[ ${prompt_user}${prompt_host}${bb}${prompt_cwd}${prompt_jobs} ]${vcs_info_msg_0_}${new_line}${prompt_bang}" }