1
|
1
|
new file mode 100644
|
...
|
...
|
@@ -0,0 +1,33 @@
|
|
0
|
+# the idea of this theme is to contain a lot of info in a small string, by compressing some parts,
|
|
1
|
+# and colorcoding, which bring useful visual cues. While limiting the amount of colors and such to keep
|
|
2
|
+# it easy on the eyes
|
|
3
|
+# exact return code (when >0) is on the right, so it stays out of the way
|
|
4
|
+
|
|
5
|
+# TODO: reset exit code visual cues (not exit code itself) after showing once
|
|
6
|
+# TODO: compress hostname in window title
|
|
7
|
+
|
|
8
|
+typeset -A host_repr
|
|
9
|
+host_repr=('dieter-ws-a7n8x-arch' "%{$fg_bold[green]%}ws" 'dieter-p4sci-arch' "%{$fg_bold[blue]%}p4")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+# local time, color coded after last return code
|
|
13
|
+local time="%(?.%{$fg[green]%}.%{$fg[red]%})%*%{$reset_color%}"
|
|
14
|
+# user part, color coded after privileges
|
|
15
|
+local user="%(!.%{$fg[blue]%}.%{$fg[blue]%})%n%{$reset_color%}"
|
|
16
|
+# Hostname part. compressed and colorcoded per host_repr array
|
|
17
|
+# if not found, regular hostname in default color
|
|
18
|
+local host="@${host_repr[$(hostname)]:-$(hostname)}%{$reset_color%}"
|
|
19
|
+# Compacted $PWD
|
|
20
|
+local pwd="%{$fg[blue]%}%c%{$reset_color%}"
|
|
21
|
+
|
|
22
|
+PROMPT='${time} ${user}${host} ${pwd} $(git_prompt_info)'
|
|
23
|
+
|
|
24
|
+# i would prefer 1 icon that shows the "most drastic" deviation from head, but lets see how this works out
|
|
25
|
+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}"
|
|
26
|
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
|
27
|
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%} %{$fg[yellow]%}?%{$fg[green]%}%{$reset_color%}"
|
|
28
|
+ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}"
|
|
29
|
+
|
|
30
|
+# elaborate exitcode on the right when >0
|
|
31
|
+local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
|
32
|
+RPS1="${return_code}"
|