blob: 27c64450a38dc4dc6199c3a1ee677f32ac1d7931 (
plain)
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
|
prompt_kyrias_help() {
cat <<EOF
kyrias' prompt.
EOF
}
prompt_user_color() {
if (( ! UID )); then
print "red"
else
print "black"
fi
}
venv_prompt() {
if [[ -n "$VIRTUAL_ENV" ]]; then
print -Pn '%{$bg[blue]$fg[white] ${VIRTUAL_ENV##*/} %f%k%}'
fi
}
prompt_kyrias_setup() {
setopt prompt_subst
autoload -U colors && colors
PROMPT='%{$bg[$(prompt_user_color)]$fg[white] %m %k%f$bg[white]$fg[$(prompt_user_color)] %~ %f%k$(venv_prompt)%}
%{$bg[blue]%} λ %k %}'
}
prompt_kyrias_preview() {
prompt_preview_theme kyrias "$@"
}
prompt_kyrias_setup "$@"
# vim: ft=zsh
|