summaryrefslogtreecommitdiff
path: root/themes/dieter.zsh-theme
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2010-11-24 18:03:14 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2010-11-24 18:03:14 +0100
commite5beb1a6b5f31d2fa1c77598ef48d888b773e26c (patch)
tree79d2ff34783fa54e33de4f037979b2cdfad8b617 /themes/dieter.zsh-theme
parent583c984a864969579a0c258528ae93f9529308d4 (diff)
downloadzsh-e5beb1a6b5f31d2fa1c77598ef48d888b773e26c.tar.gz
zsh-e5beb1a6b5f31d2fa1c77598ef48d888b773e26c.tar.bz2
zsh-e5beb1a6b5f31d2fa1c77598ef48d888b773e26c.zip
add dieter theme v1
Diffstat (limited to 'themes/dieter.zsh-theme')
-rw-r--r--themes/dieter.zsh-theme33
1 files changed, 33 insertions, 0 deletions
diff --git a/themes/dieter.zsh-theme b/themes/dieter.zsh-theme
new file mode 100644
index 000000000..5b61c80ce
--- /dev/null
+++ b/themes/dieter.zsh-theme
@@ -0,0 +1,33 @@
+# the idea of this theme is to contain a lot of info in a small string, by compressing some parts,
+# and colorcoding, which bring useful visual cues. While limiting the amount of colors and such to keep
+# it easy on the eyes
+# exact return code (when >0) is on the right, so it stays out of the way
+
+# TODO: reset exit code visual cues (not exit code itself) after showing once
+# TODO: compress hostname in window title
+
+typeset -A host_repr
+host_repr=('dieter-ws-a7n8x-arch' "%{$fg_bold[green]%}ws" 'dieter-p4sci-arch' "%{$fg_bold[blue]%}p4")
+
+
+# local time, color coded after last return code
+local time="%(?.%{$fg[green]%}.%{$fg[red]%})%*%{$reset_color%}"
+# user part, color coded after privileges
+local user="%(!.%{$fg[blue]%}.%{$fg[blue]%})%n%{$reset_color%}"
+# Hostname part. compressed and colorcoded per host_repr array
+# if not found, regular hostname in default color
+local host="@${host_repr[$(hostname)]:-$(hostname)}%{$reset_color%}"
+# Compacted $PWD
+local pwd="%{$fg[blue]%}%c%{$reset_color%}"
+
+PROMPT='${time} ${user}${host} ${pwd} $(git_prompt_info)'
+
+# i would prefer 1 icon that shows the "most drastic" deviation from head, but lets see how this works out
+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}"
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%} %{$fg[yellow]%}?%{$fg[green]%}%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}"
+
+# elaborate exitcode on the right when >0
+local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
+RPS1="${return_code}"