Browse code

Merge pull request #378 from secondplanet/master

Humza.zsh-theme

Robby Russell authored on 03/06/2011 at 15:50:07
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,26 @@
0
+# ZSH THEME Preview: https://skitch.com/huyy/rk979/humza.zshtheme
1
+
2
+let TotalBytes=0
3
+for Bytes in $(ls -l | grep "^-" | awk '{ print $5 }')
4
+do
5
+   let TotalBytes=$TotalBytes+$Bytes
6
+done
7
+		# should it say b, kb, Mb, or Gb
8
+if [ $TotalBytes -lt 1024 ]; then
9
+   TotalSize=$(echo -e "scale=3 \n$TotalBytes \nquit" | bc)
10
+   suffix="b"
11
+elif [ $TotalBytes -lt 1048576 ]; then
12
+   TotalSize=$(echo -e "scale=3 \n$TotalBytes/1024 \nquit" | bc)
13
+   suffix="kb"
14
+elif [ $TotalBytes -lt 1073741824 ]; then
15
+   TotalSize=$(echo -e "scale=3 \n$TotalBytes/1048576 \nquit" | bc)
16
+   suffix="Mb"
17
+else
18
+   TotalSize=$(echo -e "scale=3 \n$TotalBytes/1073741824 \nquit" | bc)
19
+   suffix="Gb"
20
+fi
21
+
22
+PROMPT='%{$reset_color%}%n %{$fg[green]%}{%{$reset_color%}%~%{$fg[green]%}}%{$reset_color%}$(git_prompt_info) greetings, earthling %{$fg[green]%}[%{$reset_color%}%{$TotalSize%}%{$suffix%}%{$fg[green]%}]%{$fg[red]%}$%{$reset_color%} ☞ '
23
+
24
+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}±("
25
+ZSH_THEME_GIT_PROMPT_SUFFIX=");%{$reset_color%}"