forked from carloscuesta/materialshell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔨 ZSH prompt refactor (carloscuesta#16)
* 🔨 Refactor into a single materialshell.zsh-theme By removing the specified numeric colors and using [colorName] there's no need to have to separate files. * 📝 Update instructions
- Loading branch information
1 parent
388e3ae
commit 4165e8b
Showing
4 changed files
with
58 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
eval red=$fg[red] | ||
eval green=$fg[green] | ||
eval yellow=$fg[yellow] | ||
eval blue=$fg[blue] | ||
eval magenta=$fg[magenta] | ||
eval cyan=$fg[cyan] | ||
eval white=$fg[white] | ||
eval grey=$fg[grey] | ||
|
||
PROMPT='$(_user_host)${_current_dir}$(git_prompt_info) | ||
%{$white%}>%{$reset_color%} ' | ||
PROMPT2='%{$grey%}◀%{$reset_color%} ' | ||
RPROMPT='$(_vi_status)%{$(echotc UP 1)%}$(git_prompt_short_sha) ${_return_status} %{$white%}%T%{$(echotc DO 1)%}%{$reset_color%}' | ||
|
||
local _current_dir="%{$green%}%0~%{$reset_color%} " | ||
local _return_status="%{$red%}%(?..×)%{$reset_color%}" | ||
|
||
function _user_host() { | ||
echo "%{$red%}%n%{$reset_color%}%{$white%} at %{$yellow%}%m%{$reset_color%} %{$white%}in " | ||
} | ||
|
||
function _vi_status() { | ||
if {echo $fpath | grep -q "plugins/vi-mode"}; then | ||
echo "$(vi_mode_prompt_info)" | ||
fi | ||
} | ||
|
||
if [[ $USER == "root" ]]; then | ||
CARETCOLOR="$red" | ||
else | ||
CARETCOLOR="$white" | ||
fi | ||
|
||
MODE_INDICATOR="%{_bold$yellow%}❮%{$reset_color%}%{$yellow%}❮❮%{$reset_color%}" | ||
|
||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$white%}on %{$blue%}" | ||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " | ||
|
||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$red%}✗%{$reset_color%}" | ||
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$green%}✔%{$reset_color%}" | ||
ZSH_THEME_GIT_PROMPT_ADDED=" %{$green%}✚{$reset_color%}" | ||
ZSH_THEME_GIT_PROMPT_MODIFIED=" %{$yellow%}⚑{$reset_color%} " | ||
ZSH_THEME_GIT_PROMPT_DELETED=" %{$red%}✖{$reset_color%} " | ||
ZSH_THEME_GIT_PROMPT_RENAMED=" %{$blue%}▴{$reset_color%} " | ||
ZSH_THEME_GIT_PROMPT_UNMERGED=" %{$cyan%}§{$reset_color%} " | ||
ZSH_THEME_GIT_PROMPT_UNTRACKED=" %{$grey%}◒{$reset_color%} " | ||
|
||
# Format for git_prompt_long_sha() and git_prompt_short_sha() | ||
ZSH_THEME_GIT_PROMPT_SHA_BEFORE="%{$reset_color%}[%{$yellow%}" | ||
ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$reset_color%}]" | ||
|
||
# LS colors, made with http://geoff.greer.fm/lscolors/ | ||
export LSCOLORS="exfxcxdxbxegedabagacad" | ||
export LS_COLORS='di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:' | ||
export GREP_COLOR='1;33' |