0a2a981dfeadf0e8cfcf361e792a3e3872f1aef4

Author
Hayes Williams <hwpi31@gmail.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Adds a new theme that only seems to work on Linux

Diff

 1diff --git a/themes/linuxonly b/themes/linuxonly
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..a11b80d7f6dd446af779c7970625822c4daa5740
 4--- /dev/null
 5+++ b/themes/linuxonly
 6@@ -0,0 +1,80 @@
 7+# vim: set ts=2 textwidth=0
 8+
 9+autoload -U add-zsh-hook
10+autoload -Uz vcs_info
11+local c0=$(printf "\033[0m")
12+local c1=$(printf "\033[38;5;215m")
13+local c2=$(printf "\033[38;5;209m")
14+local c3=$(printf "\033[38;5;203m")
15+local c4=$(printf "\033[33;4m")
16+local c5=$(printf "\033[38;5;137m")
17+local c6=$(printf "\033[38;5;240m")
18+local c7=$(printf "\033[38;5;149m")
19+local c8=$(printf "\033[38;5;126m")
20+local c9=$(printf "\033[38;5;162m")
21+
22+local foopath=$(perl /home/scp1/bin/foopath)
23+
24+if [ "$TERM" = "linux" ]; then
25+    c1=$(printf "\033[34;1m")
26+    c2=$(printf "\033[35m")
27+    c3=$(printf "\033[31m")
28+    c4=$(printf "\033[31;1m")
29+    c5=$(printf "\033[32m")
30+    c6=$(printf "\033[32;1m")
31+    c7=$(printf "\033[33m")
32+    c8=$(printf "\033[33;1m")
33+    c9=$(printf "\033[34m")
34+fi
35+
36+#local newtv=$(perl $HOME/devel/newtv.pl)
37+local newtv=''
38+
39+zstyle ':vcs_info:*' actionformats \
40+    '%{$c8%}(%f%s)%{$c7%}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
41+zstyle ':vcs_info:*' formats \
42+    "%{$c8%}%s%{$c7%}:%{$c7%}(%{$c9%}%b%{$c7%})%f "
43+zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
44+zstyle ':vcs_info:*' enable git
45+
46+add-zsh-hook precmd prompt_jnrowe_precmd
47+
48+prompt_jnrowe_precmd () {
49+    vcs_info
50+
51+    if [ "${vcs_info_msg_0_}" = "" ]; then
52+        #dir_status="|%F{3}%n%F{7}@%F{3}%m%F{7}:%F{9}%l%f"
53+        #dir_status="$c1%n%F{7}@%F{9}%m%F{7}:%F{12}%/"
54+        dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
55+        #dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$foopath%} %{$c0%}(%{$c5%}%?%{$c0%})"
56+        
57+        PROMPT='%{$fg_bold[green]%}%p%{$reset_color%}${vcs_info_msg_0_}${dir_status} ${ret_status}%{$reset_color%}
58+> '
59+    elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then
60+        dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
61+        PROMPT='${vcs_info_msg_0_}
62+%{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%}
63+> '
64+    
65+    elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then
66+        dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
67+
68+        PROMPT='${vcs_info_msg_0_}
69+%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%}
70+%{$c9%}·>%{$c0%} '
71+    else
72+        dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
73+        PROMPT='${vcs_info_msg_0_}
74+%{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%}
75+> '
76+        
77+    fi
78+}
79+
80+
81+#PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$reset_color%} ${vcs_info_msg_0_}${dir_status}%{$reset_color%}
82+#> '
83+
84+# vim: set ft=zsh ts=4 sw=4 et:
85+
86+