summaryrefslogtreecommitdiff
path: root/oh-my-zsh/themes/rixius.zsh-theme
diff options
context:
space:
mode:
authorAditya <bluenerd@protonmail.com>2023-02-27 20:04:56 +0530
committerAditya <bluenerd@protonmail.com>2023-02-27 20:04:56 +0530
commitedc449275b6c04445f58b108ca0937a87c1e8430 (patch)
tree9fd484d58145b616f29a78857cc0b1c8b1c18f05 /oh-my-zsh/themes/rixius.zsh-theme
parent6f5424ca96c4221ef433f545642669e9c104d0ed (diff)
add zsh
Diffstat (limited to 'oh-my-zsh/themes/rixius.zsh-theme')
-rw-r--r--oh-my-zsh/themes/rixius.zsh-theme21
1 files changed, 21 insertions, 0 deletions
diff --git a/oh-my-zsh/themes/rixius.zsh-theme b/oh-my-zsh/themes/rixius.zsh-theme
new file mode 100644
index 0000000..b33f23e
--- /dev/null
+++ b/oh-my-zsh/themes/rixius.zsh-theme
@@ -0,0 +1,21 @@
+# name in folder (github)
+# ± if in github repo, or ≥ if otherwise Time in 24-hour format is on right.
+function collapse_pwd {
+ echo $(pwd | sed -e "s,^$HOME,~,")
+}
+function prompt_char {
+ echo -n "%{$bg[white]%}%{$fg[red]%}"
+ git branch >/dev/null 2>/dev/null && echo "±%{$reset_color%}" && return
+ echo "≥%{$reset_color%}"
+}
+RIXIUS_PRE="%{$bg[white]%}%{$fg[red]%}"
+
+PROMPT='
+%{$RIXIUS_PRE%}%n%{$reset_color%} in %{$fg_bold[green]%}$(collapse_pwd)%{$reset_color%}$(git_prompt_info)
+$(prompt_char) '
+RPROMPT='%{$RIXIUS_PRE%}%T%{$reset_color%}'
+
+ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_DIRTY=" %{$RIXIUS_PRE%}!%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_CLEAN=" %{$RIXIUS_PRE%}√%{$reset_color%}"