3 # prompt, colors are defined in host resource file
10 date="%{$fg[$date_color]%}%D{$date_format}"
11 host="%{$fg[$host_color]%}%n%{$reset_color%}~%{$fg[$domain_color]%}%m"
12 cpath="%B%{$fg[$path_color]%}%/%b"
13 end="%{$reset_color%}"
15 # permit parameter expansion, command substitution and arithmetic expansion
21 load=(${$(< /proc/loadavg)})
22 LOADAVG="$load[1] $load[2]"
24 MEM="$((100 * $buffer[16] / $buffer[8]))%%"
25 if [[ $buffer[19] != 0 ]]; then
26 MEM="$MEM $((100 * $buffer[20] / $buffer[19]))%%"
30 stats="%{$fg[$status_color]%}[\$LOADAVG - \$MEM]"
32 PS1="$date ($host$end) $cpath
35 RPS1="$stats%{$reset_color%}"
39 # function use to toggle RPS1 (which is very ugly for copy/paste)
45 RPS1="$stats%{$reset_color%}"
49 eval `dircolors $HOME/.zsh/misc/dircolors.rc`
51 # Use LS_COLORS for color completion
52 zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}