11a0c33323c9764eb716466f44537dac3fe19295
- Author
- Robby Russell <robby@planetargon.com>
- Committer
- Robby Russell <robby@planetargon.com>
- Date
Message
Merge pull request #441 from Gonzih/master
Create gnzh theme and vundle plugin
Diff
1diff --git a/plugins/vundle/vundle.plugin.zsh b/plugins/vundle/vundle.plugin.zsh
2new file mode 100644
3index 0000000000000000000000000000000000000000..005a584769cf24e787b8df3e37402d3bf618c6bc
4--- /dev/null
5+++ b/plugins/vundle/vundle.plugin.zsh
6@@ -0,0 +1,23 @@
7+function vundle-init () {
8+ if [ ! -d ~/.vim/bundle/vundle/ ]
9+ then
10+ mkdir -p ~/.vim/bundle/vundle/
11+ fi
12+
13+ if [ ! -d ~/.vim/bundle/vundle/.git/ ]
14+ then
15+ git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
16+ echo "\n\tRead about vim configuration for vundle at https://github.com/gmarik/vundle\n"
17+ fi
18+}
19+
20+function vundle () {
21+ vundle-init
22+ vim -c "execute \"BundleInstall\" | q | q"
23+}
24+
25+
26+function vundle-update () {
27+ vundle-init
28+ vim -c "execute \"BundleInstall!\" | q | q"
29+}
30diff --git a/themes/gnzh.zsh-theme b/themes/gnzh.zsh-theme
31new file mode 100644
32index 0000000000000000000000000000000000000000..3c6b8a409f6de3d5750cacff36edfdaad764e003
33--- /dev/null
34+++ b/themes/gnzh.zsh-theme
35@@ -0,0 +1,54 @@
36+# ZSH Theme - Preview: http://dl.dropbox.com/u/4109351/pics/gnzh-zsh-theme.png
37+# Based on bira theme
38+
39+# load some modules
40+autoload -U colors zsh/terminfo # Used in the colour alias below
41+colors
42+setopt prompt_subst
43+
44+# make some aliases for the colours: (coud use normal escap.seq's too)
45+for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
46+ eval PR_$color='%{$fg[${(L)color}]%}'
47+done
48+eval PR_NO_COLOR="%{$terminfo[sgr0]%}"
49+eval PR_BOLD="%{$terminfo[bold]%}"
50+
51+# Check the UID
52+if [[ $UID -ge 1000 ]]; then # normal user
53+ eval PR_USER='${PR_GREEN}%n${PR_NO_COLOR}'
54+ eval PR_USER_OP='${PR_GREEN}%#${PR_NO_COLOR}'
55+ local PR_PROMPT='$PR_NO_COLOR➤ $PR_NO_COLOR'
56+elif [[ $UID -eq 0 ]]; then # root
57+ eval PR_USER='${PR_RED}%n${PR_NO_COLOR}'
58+ eval PR_USER_OP='${PR_RED}%#${PR_NO_COLOR}'
59+ local PR_PROMPT='$PR_RED➤ $PR_NO_COLOR'
60+fi
61+
62+# Check if we are on SSH or not
63+if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then
64+ eval PR_HOST='${PR_YELLOW}%M${PR_NO_COLOR}' #SSH
65+else
66+ eval PR_HOST='${PR_GREEN}%M${PR_NO_COLOR}' # no SSH
67+fi
68+
69+local return_code="%(?..%{$PR_RED%}%? ↵%{$PR_NO_COLOR%})"
70+
71+local user_host='${PR_USER}${PR_CYAN}@${PR_HOST}'
72+local current_dir='%{$PR_BOLD$PR_BLUE%}%~%{$PR_NO_COLOR%}'
73+local rvm_ruby=''
74+if which rvm-prompt &> /dev/null; then
75+ rvm_ruby='%{$PR_RED%}‹$(rvm-prompt i v g s)›%{$PR_NO_COLOR%}'
76+else
77+ if which rbenv &> /dev/null; then
78+ rvm_ruby='%{$PR_RED%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$PR_NO_COLOR%}'
79+ fi
80+fi
81+local git_branch='$(git_prompt_info)%{$PR_NO_COLOR%}'
82+
83+#PROMPT="${user_host} ${current_dir} ${rvm_ruby} ${git_branch}$PR_PROMPT "
84+PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch}
85+╰─$PR_PROMPT "
86+RPS1="${return_code}"
87+
88+ZSH_THEME_GIT_PROMPT_PREFIX="%{$PR_YELLOW%}‹"
89+ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$PR_NO_COLOR%}"