From ded1e27f56782925807170c4ed3b140b796174ca Mon Sep 17 00:00:00 2001 From: awdavies Date: Thu, 11 Apr 2013 13:18:07 -0700 Subject: [PATCH 1/3] Added zephyr theme. --- themes/zephyr.zsh-theme | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 themes/zephyr.zsh-theme diff --git a/themes/zephyr.zsh-theme b/themes/zephyr.zsh-theme new file mode 100644 index 000000000..100f85487 --- /dev/null +++ b/themes/zephyr.zsh-theme @@ -0,0 +1,31 @@ +# /|/ Code by Stephen +# /|/ "Rixius" Middleton +# +# 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,~,") +} +RIXIUS_PRE="%{$fg[white]%}" +function prompt_char { + echo -n "%{$RIXIUS_PRE%}" + git branch >/dev/null 2>/dev/null && echo "╘╡%{$reset_color%}" && return + echo "└╼%{$reset_color%}" +} +function close_git { + git branch >/dev/null 2>/dev/null && echo "│" +} +function open_git { + git branch >/dev/null 2>/dev/null && echo "├─┤" && return + echo "│" +} + +PROMPT=' +%{$RIXIUS_PRE%}┌┤%m├─┤%{$reset_color%}%{$fg[blue]%}$(collapse_pwd)%{$RIXIUS_PRE%}$(open_git)%{$reset_color%}$(git_prompt_info)%{$RIXIUS_PRE%}$(close_git)%{$reset_color%} +$(prompt_char) ' +RPROMPT='%{$RIXIUS_PRE%}%T%{$reset_color%}' + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$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%}" From 90b84df8dea82b5287a9a4b805c07834b15d612b Mon Sep 17 00:00:00 2001 From: awdavies Date: Thu, 11 Apr 2013 13:28:34 -0700 Subject: [PATCH 2/3] Cleaned up theme. --- themes/zephyr.zsh-theme | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/themes/zephyr.zsh-theme b/themes/zephyr.zsh-theme index 100f85487..2addfb7f5 100644 --- a/themes/zephyr.zsh-theme +++ b/themes/zephyr.zsh-theme @@ -1,14 +1,13 @@ -# /|/ Code by Stephen -# /|/ "Rixius" Middleton +# /|/ Code by Andrew Davies: "Zephyr" # -# name in folder (github) -# ± if in github repo, or ≥ if otherwise Time in 24-hour format is on right. +# name in folder (github). github branch shown when in git directory, also shows `*` +# to indicate dirty repo. function collapse_pwd { echo $(pwd | sed -e "s,^$HOME,~,") } -RIXIUS_PRE="%{$fg[white]%}" +ZEPHYR_PRE="%{$fg[white]%}" function prompt_char { - echo -n "%{$RIXIUS_PRE%}" + echo -n "%{$ZEPHYR_PRE%}" git branch >/dev/null 2>/dev/null && echo "╘╡%{$reset_color%}" && return echo "└╼%{$reset_color%}" } @@ -21,11 +20,11 @@ function open_git { } PROMPT=' -%{$RIXIUS_PRE%}┌┤%m├─┤%{$reset_color%}%{$fg[blue]%}$(collapse_pwd)%{$RIXIUS_PRE%}$(open_git)%{$reset_color%}$(git_prompt_info)%{$RIXIUS_PRE%}$(close_git)%{$reset_color%} +%{$ZEPHYR_PRE%}┌┤%m├─┤%{$reset_color%}%{$fg[blue]%}$(collapse_pwd)%{$ZEPHYR_PRE%}$(open_git)%{$reset_color%}$(git_prompt_info)%{$ZEPHYR_PRE%}$(close_git)%{$reset_color%} $(prompt_char) ' -RPROMPT='%{$RIXIUS_PRE%}%T%{$reset_color%}' +RPROMPT='%{$ZEPHYR_PRE%}%T%{$reset_color%}' ZSH_THEME_GIT_PROMPT_PREFIX="%{$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%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$ZEPHYR_PRE%}*%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$ZEPHYR_PRE%}%{$reset_color%}" From 14fae9be343e74d943f00e0b0d52b201a6239dce Mon Sep 17 00:00:00 2001 From: awdavies Date: Fri, 17 May 2013 01:39:09 -0700 Subject: [PATCH 3/3] Added zsh-syntax-highlighting submodule. --- .gitmodules | 3 +++ plugins/zsh-syntax-highlighting | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 plugins/zsh-syntax-highlighting diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..44443d603 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "plugins/zsh-syntax-highlighting"] + path = plugins/zsh-syntax-highlighting + url = https://github.com/zsh-users/zsh-syntax-highlighting diff --git a/plugins/zsh-syntax-highlighting b/plugins/zsh-syntax-highlighting new file mode 160000 index 000000000..e5d8a50d3 --- /dev/null +++ b/plugins/zsh-syntax-highlighting @@ -0,0 +1 @@ +Subproject commit e5d8a50d362a153a28506be6fae9cf179dbb5fd4