Blame view
repos/robbyrussell/oh-my-zsh/themes/humza.zsh-theme
1000 Bytes
|
093a6c34b
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# ZSH THEME Preview: https://skitch.com/huyy/rk979/humza.zshtheme
let TotalBytes=0
for Bytes in $(ls -l | grep "^-" | awk '{ print $5 }')
do
let TotalBytes=$TotalBytes+$Bytes
done
# should it say b, kb, Mb, or Gb
if [ $TotalBytes -lt 1024 ]; then
TotalSize=$(echo -e "scale=3
$TotalBytes
quit" | bc)
suffix="b"
elif [ $TotalBytes -lt 1048576 ]; then
TotalSize=$(echo -e "scale=3
$TotalBytes/1024
quit" | bc)
suffix="kb"
elif [ $TotalBytes -lt 1073741824 ]; then
TotalSize=$(echo -e "scale=3
$TotalBytes/1048576
quit" | bc)
suffix="Mb"
else
TotalSize=$(echo -e "scale=3
$TotalBytes/1073741824
quit" | bc)
suffix="Gb"
fi
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%} ☞ '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}±("
ZSH_THEME_GIT_PROMPT_SUFFIX=");%{$reset_color%}"
|