-
Notifications
You must be signed in to change notification settings - Fork 0
/
yeet-theme.zsh-theme
74 lines (62 loc) · 2.82 KB
/
yeet-theme.zsh-theme
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env zsh
# __
# __ _____ ___ / /______
# / / / / _ \/ _ \/ __/ ___/
# / /_/ / __/ __/ /_(__ )
# \__, /\___/\___/\__/____/
# /____/
# _____
# _________ ____ / __(_)___ _
# / ___/ __ \/ __ \/ /_/ / __ `/
# / /__/ /_/ / / / / __/ / /_/ /
# \___/\____/_/ /_/_/ /_/\__, /
# /____/
# for his zsh theme
#this is a simple prompt for the zsh theme it presents git info using trendy little symbols and gives you the return code
#hopefull it is written well (as most of it is based on muse from zsh) i will now proceed to coment what parts do
setopt promptsubst
autoload -U colors && colors
autoload -U add-zsh-hook
## sourceing the lib
source ${0:A:h}/lib/prompt_info_functions.zsh
source ${0:A:h}/lib/git.zsh
source ${0:A:h}/lib/theme-and-appearance.zsh
source ${0:A:h}/lib/spectrum.zsh
#--------------------{colours
PROMPT_SUCCESS_COLOR=$FG[117]
PROMPT_FAILURE_COLOR=$FG[124]
PROMPT_VCS_INFO_COLOR=$FG[242]
PROMPT_PROMPT=$FG[077]
GIT_DIRTY_COLOR=$FG[133]
GIT_CLEAN_COLOR=$FG[118]
GIT_PROMPT_INFO=$FG[012]
#----there are not more colours}
ZSH_THEME_GIT_PROMPT_PREFIX="("
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$GIT_PROMPT_INFO%})"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$GIT_DIRTY_COLOR%}⚡"
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$GIT_CLEAN_COLOR%}✔"
#-------------{git symbols if these show up you have some commiting to do
ZSH_THEME_GIT_PROMPT_ADDED="%{$FG[082]%} +%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$FG[166]%} !%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DELETED="%{$FG[160]%} ø%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$FG[220]%} ➜%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$FG[082]%} ↯%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$FG[190]%} ❃%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg_bold[blue]%} ↓%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_bold[blue]%} ↑%{$reset_color%}"
#-------------------------------------------------git symbols are no more}
ZSH_THEME_VIRTUALENV_PREFIX=" ["
ZSH_THEME_VIRTUALENV_SUFFIX="]"
function zle-line-init zle-keymap-select { ## this function makes my right prompt. it gives me a vi normal mode indicator and also sets up a return code and a dir..printer??
local dir='%{$PROMPT_SUCCESS_COLOR%}%~%'
local return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})'
VIM_PROMPT="%{$fg_bold[yellow]%} <% N>% %{$reset_color%}"
RPS1="${${KEYMAP/vicmd/$VIM_PROMPT}/(main|viins)/} ${return_code} ${dir} $EPS1"
zle reset-prompt
}
local prompt_git='%{$GIT_PROMPT_INFO%}$(git_prompt_info)$(virtualenv_prompt_info)%{$GIT_DIRTY_COLOR%}$(git_prompt_status) %{$reset_color%}'
local prefix="%{$PROMPT_SUCCESS_COLOR%}%m:(%U%w%u)"
local suffix="%{$PROMPT_PROMPT%}ᐅ %{$reset_color%}"
PROMPT="${prefix}${prompt_git}${suffix}%{$reset_color%}"
zle -N zle-line-init
zle -N zle-keymap-select