mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
change theme to astro
This commit is contained in:
parent
59bdb3b25b
commit
ace8e27928
3 changed files with 44 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,5 +1,5 @@
|
|||
# custom files
|
||||
custom/
|
||||
#custom/
|
||||
|
||||
# temp files directories
|
||||
cache/
|
||||
|
|
|
|||
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%}"
|
||||
|
|
@ -8,7 +8,7 @@ export ZSH=$HOME/.oh-my-zsh
|
|||
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
|
||||
ZSH_THEME="robbyrussell"
|
||||
ZSH_THEME="astro"
|
||||
|
||||
# Set list of themes to pick from when loading at random
|
||||
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue