|
@@ -69,153 +69,6 @@ TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P'
|
69
|
69
|
# make less more friendly for non-text input files, see lesspipe(1)
|
70
|
70
|
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
71
|
71
|
|
72
|
|
-# set variable identifying the chroot you work in (used in the prompt below)
|
73
|
|
-if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
74
|
|
- debian_chroot=$(cat /etc/debian_chroot)
|
75
|
|
-fi
|
76
|
|
-
|
77
|
|
-# set a fancy prompt (non-color, unless we know we "want" color)
|
78
|
|
-case "$TERM" in
|
79
|
|
- xterm-color|*-256color) color_prompt=yes;;
|
80
|
|
-esac
|
81
|
|
-
|
82
|
|
-# uncomment for a colored prompt, if the terminal has the capability; turned
|
83
|
|
-# off by default to not distract the user: the focus in a terminal window
|
84
|
|
-# should be on the output of commands, not on the prompt
|
85
|
|
-force_color_prompt=yes
|
86
|
|
-
|
87
|
|
-if [ -n "$force_color_prompt" ]; then
|
88
|
|
- if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
89
|
|
- # We have color support; assume it's compliant with Ecma-48
|
90
|
|
- # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
91
|
|
- # a case would tend to support setf rather than setaf.)
|
92
|
|
- color_prompt=yes
|
93
|
|
- else
|
94
|
|
- color_prompt=
|
95
|
|
- fi
|
96
|
|
-fi
|
97
|
|
-
|
98
|
|
-configure_prompt() {
|
99
|
|
- prompt_symbol=㉿
|
100
|
|
- # Skull emoji for root terminal
|
101
|
|
- [ "$EUID" -eq 0 ] && prompt_symbol=💀
|
102
|
|
- case "$PROMPT_ALTERNATIVE" in
|
103
|
|
- twoline)
|
104
|
|
- PROMPT=$'%F{%(#.blue.green)}╔══${debian_chroot:+($debian_chroot)─}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))─}(%B%F{%(#.red.blue)}%n'$prompt_symbol$'%m%b%F{%(#.blue.green)})-[%B%F{reset}%(6~.%-1~/…/%4~.%5~)%b%F{%(#.blue.green)}]\n`giti -n`%F{%(#.blue.green)}╚═%B%(#.%F{red}#.%F{blue}$)%b%F{reset} '
|
105
|
|
- # Right-side prompt with exit codes and background processes
|
106
|
|
- RPROMPT=$'%(?.. %? %F{red}%B⨯%b%F{reset})%(1j. %j %F{yellow}%B⚙%b%F{reset}.)'
|
107
|
|
- ;;
|
108
|
|
- oneline)
|
109
|
|
- PROMPT=$'${debian_chroot:+($debian_chroot)}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%B%F{%(#.red.blue)}%n@%m%b%F{reset}:%B%F{%(#.blue.green)}%~%b%F{reset}%(#.#.$) '
|
110
|
|
- RPROMPT=
|
111
|
|
- ;;
|
112
|
|
- backtrack)
|
113
|
|
- PROMPT=$'${debian_chroot:+($debian_chroot)}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%B%F{red}%n@%m%b%F{reset}:%B%F{blue}%~%b%F{reset}%(#.#.$) '
|
114
|
|
- RPROMPT=
|
115
|
|
- ;;
|
116
|
|
- esac
|
117
|
|
- unset prompt_symbol
|
118
|
|
-}
|
119
|
|
-
|
120
|
|
-# The following block is surrounded by two delimiters.
|
121
|
|
-# These delimiters must not be modified. Thanks.
|
122
|
|
-# START KALI CONFIG VARIABLES
|
123
|
|
-PROMPT_ALTERNATIVE=twoline
|
124
|
|
-NEWLINE_BEFORE_PROMPT=yes
|
125
|
|
-# STOP KALI CONFIG VARIABLES
|
126
|
|
-
|
127
|
|
-if [ "$color_prompt" = yes ]; then
|
128
|
|
- # override default virtualenv indicator in prompt
|
129
|
|
- VIRTUAL_ENV_DISABLE_PROMPT=1
|
130
|
|
-
|
131
|
|
- configure_prompt
|
132
|
|
-
|
133
|
|
- # enable syntax-highlighting
|
134
|
|
- if [ -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then
|
135
|
|
- . /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
136
|
|
- ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern)
|
137
|
|
- ZSH_HIGHLIGHT_STYLES[default]=none
|
138
|
|
- ZSH_HIGHLIGHT_STYLES[unknown-token]=fg=white,underline
|
139
|
|
- ZSH_HIGHLIGHT_STYLES[reserved-word]=fg=cyan,bold
|
140
|
|
- ZSH_HIGHLIGHT_STYLES[suffix-alias]=fg=green,underline
|
141
|
|
- ZSH_HIGHLIGHT_STYLES[global-alias]=fg=green,bold
|
142
|
|
- ZSH_HIGHLIGHT_STYLES[precommand]=fg=green,underline
|
143
|
|
- ZSH_HIGHLIGHT_STYLES[commandseparator]=fg=blue,bold
|
144
|
|
- ZSH_HIGHLIGHT_STYLES[autodirectory]=fg=green,underline
|
145
|
|
- ZSH_HIGHLIGHT_STYLES[path]=bold
|
146
|
|
- ZSH_HIGHLIGHT_STYLES[path_pathseparator]=
|
147
|
|
- ZSH_HIGHLIGHT_STYLES[path_prefix_pathseparator]=
|
148
|
|
- ZSH_HIGHLIGHT_STYLES[globbing]=fg=blue,bold
|
149
|
|
- ZSH_HIGHLIGHT_STYLES[history-expansion]=fg=blue,bold
|
150
|
|
- ZSH_HIGHLIGHT_STYLES[command-substitution]=none
|
151
|
|
- ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]=fg=magenta,bold
|
152
|
|
- ZSH_HIGHLIGHT_STYLES[process-substitution]=none
|
153
|
|
- ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]=fg=magenta,bold
|
154
|
|
- ZSH_HIGHLIGHT_STYLES[single-hyphen-option]=fg=green
|
155
|
|
- ZSH_HIGHLIGHT_STYLES[double-hyphen-option]=fg=green
|
156
|
|
- ZSH_HIGHLIGHT_STYLES[back-quoted-argument]=none
|
157
|
|
- ZSH_HIGHLIGHT_STYLES[back-quoted-argument-delimiter]=fg=blue,bold
|
158
|
|
- ZSH_HIGHLIGHT_STYLES[single-quoted-argument]=fg=yellow
|
159
|
|
- ZSH_HIGHLIGHT_STYLES[double-quoted-argument]=fg=yellow
|
160
|
|
- ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]=fg=yellow
|
161
|
|
- ZSH_HIGHLIGHT_STYLES[rc-quote]=fg=magenta
|
162
|
|
- ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]=fg=magenta,bold
|
163
|
|
- ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]=fg=magenta,bold
|
164
|
|
- ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]=fg=magenta,bold
|
165
|
|
- ZSH_HIGHLIGHT_STYLES[assign]=none
|
166
|
|
- ZSH_HIGHLIGHT_STYLES[redirection]=fg=blue,bold
|
167
|
|
- ZSH_HIGHLIGHT_STYLES[comment]=fg=black,bold
|
168
|
|
- ZSH_HIGHLIGHT_STYLES[named-fd]=none
|
169
|
|
- ZSH_HIGHLIGHT_STYLES[numeric-fd]=none
|
170
|
|
- ZSH_HIGHLIGHT_STYLES[arg0]=fg=cyan
|
171
|
|
- ZSH_HIGHLIGHT_STYLES[bracket-error]=fg=red,bold
|
172
|
|
- ZSH_HIGHLIGHT_STYLES[bracket-level-1]=fg=blue,bold
|
173
|
|
- ZSH_HIGHLIGHT_STYLES[bracket-level-2]=fg=green,bold
|
174
|
|
- ZSH_HIGHLIGHT_STYLES[bracket-level-3]=fg=magenta,bold
|
175
|
|
- ZSH_HIGHLIGHT_STYLES[bracket-level-4]=fg=yellow,bold
|
176
|
|
- ZSH_HIGHLIGHT_STYLES[bracket-level-5]=fg=cyan,bold
|
177
|
|
- ZSH_HIGHLIGHT_STYLES[cursor-matchingbracket]=standout
|
178
|
|
- fi
|
179
|
|
-else
|
180
|
|
- PROMPT='${debian_chroot:+($debian_chroot)}%n@%m:%~%(#.#.$) '
|
181
|
|
-fi
|
182
|
|
-unset color_prompt force_color_prompt
|
183
|
|
-
|
184
|
|
-toggle_oneline_prompt(){
|
185
|
|
- if [ "$PROMPT_ALTERNATIVE" = oneline ]; then
|
186
|
|
- PROMPT_ALTERNATIVE=twoline
|
187
|
|
- else
|
188
|
|
- PROMPT_ALTERNATIVE=oneline
|
189
|
|
- fi
|
190
|
|
- configure_prompt
|
191
|
|
- zle reset-prompt
|
192
|
|
-}
|
193
|
|
-zle -N toggle_oneline_prompt
|
194
|
|
-bindkey ^P toggle_oneline_prompt
|
195
|
|
-
|
196
|
|
-# If this is an xterm set the title to user@host:dir
|
197
|
|
-case "$TERM" in
|
198
|
|
-xterm*|rxvt*|Eterm|aterm|kterm|gnome*|alacritty)
|
199
|
|
- TERM_TITLE=$'\e]0;${debian_chroot:+($debian_chroot)}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%n@%m: %~\a'
|
200
|
|
- ;;
|
201
|
|
-*)
|
202
|
|
- ;;
|
203
|
|
-esac
|
204
|
|
-
|
205
|
|
-precmd() {
|
206
|
|
- # Print the previously configured title
|
207
|
|
- print -Pnr -- "$TERM_TITLE"
|
208
|
|
-
|
209
|
|
- # Print a new line before the prompt, but only if it is not the first line
|
210
|
|
- if [ "$NEWLINE_BEFORE_PROMPT" = yes ]; then
|
211
|
|
- if [ -z "$_NEW_LINE_BEFORE_PROMPT" ]; then
|
212
|
|
- _NEW_LINE_BEFORE_PROMPT=1
|
213
|
|
- else
|
214
|
|
- print ""
|
215
|
|
- fi
|
216
|
|
- fi
|
217
|
|
-}
|
218
|
|
-
|
219
|
72
|
# enable color support of ls, less and man, and also add handy aliases
|
220
|
73
|
if [ -x /usr/bin/dircolors ]; then
|
221
|
74
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|