mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-30 02:44:42 +01:00
change theme to astro
This commit is contained in:
parent
59bdb3b25b
commit
ace8e27928
3 changed files with 44 additions and 2 deletions
42
custom/themes/astro.zsh-theme
Normal file
42
custom/themes/astro.zsh-theme
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
# User info
|
||||
if [[ $UID -eq 0 ]]; then
|
||||
local user_host='%{$terminfo[bold]$fg[red]%}%n@%m %{$reset_color%}'
|
||||
local user_symbol='#'
|
||||
else
|
||||
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m %{$reset_color%}'
|
||||
local user_symbol='$'
|
||||
fi
|
||||
|
||||
# Directory info.
|
||||
local current_dir='${PWD/#$HOME/~} '
|
||||
|
||||
# ret status
|
||||
local ret_status="(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
|
||||
|
||||
# VCS
|
||||
YS_VCS_PROMPT_PREFIX="%{$fg_bold[white]%}[%{$reset_color%}%{$fg_bold[cyan]%}"
|
||||
YS_VCS_PROMPT_SUFFIX="%{$reset_color%} "
|
||||
YS_VCS_PROMPT_DIRTY=" %{$fg[red]%}✗"
|
||||
YS_VCS_PROMPT_CLEAN=" %{$fg[green]%}●"
|
||||
|
||||
# Git short sha
|
||||
local git_sha='$(git_prompt_short_sha)'
|
||||
ZSH_THEME_GIT_PROMPT_SHA_BEFORE="%{$fg_bold[red]%}("
|
||||
ZSH_THEME_GIT_PROMPT_SHA_AFTER=")%{$reset_color%}%{$fg_bold[white]%}]%{$reset_color%} "
|
||||
|
||||
# Git info.
|
||||
local git_info='$(git_prompt_info)'
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="$YS_VCS_PROMPT_PREFIX"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="$YS_VCS_PROMPT_SUFFIX"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="$YS_VCS_PROMPT_DIRTY"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="$YS_VCS_PROMPT_CLEAN"
|
||||
|
||||
|
||||
# Prompt format: \n # DIRECTORY [GIT_BRANCH STATE GIT_SHA] \n ➜
|
||||
PROMPT="
|
||||
%{$terminfo[bold]$fg[blue]%}${user_symbol}%{$reset_color%} \
|
||||
${user_host}\
|
||||
%{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\
|
||||
${git_info}\
|
||||
${git_sha}
|
||||
%${ret_status}%{$reset_color%}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue