diff options
Diffstat (limited to 'themes')
| -rw-r--r-- | themes/gentoo.zsh-theme | 2 | ||||
| -rw-r--r-- | themes/ys.zsh-theme | 20 | 
2 files changed, 17 insertions, 5 deletions
| diff --git a/themes/gentoo.zsh-theme b/themes/gentoo.zsh-theme index ae3274022..e18bce890 100644 --- a/themes/gentoo.zsh-theme +++ b/themes/gentoo.zsh-theme @@ -25,4 +25,4 @@ gentoo_precmd() {  autoload -U add-zsh-hook  add-zsh-hook precmd gentoo_precmd -PROMPT='%(!.%B%F{red}.%B%F{green}%n@)%m %F{blue}%(!.%1~.%~) ${vcs_info_msg_0_}%(!.#.$)%{$reset_color%} ' +PROMPT='%(!.%B%F{red}.%B%F{green}%n@)%m %F{blue}%(!.%1~.%~) ${vcs_info_msg_0_}%(!.#.$)%k%b%f ' diff --git a/themes/ys.zsh-theme b/themes/ys.zsh-theme index 89d5355dc..303c898b4 100644 --- a/themes/ys.zsh-theme +++ b/themes/ys.zsh-theme @@ -26,15 +26,26 @@ ys_hg_prompt_info() {  	if [ -d '.hg' ]; then  		echo -n "${YS_VCS_PROMPT_PREFIX1}hg${YS_VCS_PROMPT_PREFIX2}"  		echo -n $(hg branch 2>/dev/null) -		if [ -n "$(hg status 2>/dev/null)" ]; then -			echo -n "$YS_VCS_PROMPT_DIRTY" -		else -			echo -n "$YS_VCS_PROMPT_CLEAN" +		if [[ "$(hg config oh-my-zsh.hide-dirty 2>/dev/null)" != "1" ]]; then +			if [ -n "$(hg status 2>/dev/null)" ]; then +				echo -n "$YS_VCS_PROMPT_DIRTY" +			else +				echo -n "$YS_VCS_PROMPT_CLEAN" +			fi  		fi  		echo -n "$YS_VCS_PROMPT_SUFFIX"  	fi  } +# Virtualenv +local venv_info='$(virtenv_prompt)' +YS_THEME_VIRTUALENV_PROMPT_PREFIX=" %{$fg[green]%}" +YS_THEME_VIRTUALENV_PROMPT_SUFFIX=" %{$reset_color%}%" +virtenv_prompt() { +	[[ -n ${VIRTUAL_ENV} ]] || return +	echo "${YS_THEME_VIRTUALENV_PROMPT_PREFIX}${VIRTUAL_ENV:t}${YS_THEME_VIRTUALENV_PROMPT_SUFFIX}" +} +  local exit_code="%(?,,C:%{$fg[red]%}%?%{$reset_color%})"  # Prompt format: @@ -55,6 +66,7 @@ PROMPT="  %{$terminfo[bold]$fg[yellow]%}%~%{$reset_color%}\  ${hg_info}\  ${git_info}\ +${venv_info}\   \  %{$fg[white]%}[%*] $exit_code  %{$terminfo[bold]$fg[red]%}$ %{$reset_color%}" | 
