-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zsh_prompt
34 lines (28 loc) · 909 Bytes
/
.zsh_prompt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env zsh
# get the name of the branch we are on
my_vcs_info() {
vcs_info
echo "$vcs_info_msg_0_"
}
setprompt_simple() {
autoload -U colors
colors
autoload -Uz vcs_info
vcs_info
zstyle ':vcs_info:*' formats "(%s)[%b] "
zstyle ':vcs_info:*' actionformats "(%s)[%b|%a] "
setopt prompt_subst
for COLOR in BLUE RED GREEN YELLOW WHITE GREY BLACK PURPLE CYAN; do
eval PR_$COLOR='%{$fg[${(L)COLOR}]%}'
eval PR_BOLD_$COLOR='%{$fg_bold[${(L)COLOR}]%}'
done
PR_RESET="%{$reset_color%}"
PROMPT='$PR_BLUE%n$PR_WHITE@$PR_BOLD_YELLOW%m $PR_BLUE%c $PR_RESET$(my_vcs_info)$PR_BLUE%% $PR_RESET'
}
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
if [ -f ~/powerlevel10k/powerlevel10k.zsh-theme ]; then
source ~/powerlevel10k/powerlevel10k.zsh-theme
else
setprompt_simple
fi