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