Skip to content

Instantly share code, notes, and snippets.

@aterrel
Created January 19, 2011 02:14
Show Gist options
  • Select an option

  • Save aterrel/785566 to your computer and use it in GitHub Desktop.

Select an option

Save aterrel/785566 to your computer and use it in GitHub Desktop.
Relevant bash for my prompt
# Set the prompt
export CLICOLOR=1
source $HOME/.git-completion.sh
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
win-divider() {
s="_"
o=""
let nl=$COLUMNS
for i in `seq 1 $nl`; do o="${o}${s}"; done
echo $o
}
TBytes() {
TBytes=0
for Bytes in $(ls -l | grep "^-" | awk '{ print $5 }')
do
let TBytes=$TBytes+$Bytes
done
TotalMeg=$(echo -e "scale=3 \n$TBytes/1048576 \nquit" | bc)
echo -n "$TotalMeg"
}
export PS1="\[\e[1m\]\$(win-divider)\n| \[\e[1;30;47m\]\[\e[1;30;31m\][\$(date +%m-%d\" \"%H:%M)] \[\e[1;30;34m\]\u\[\e[1;30;31m\]@\[\e[1;30;32m\]\h\[\e[1;30;47m\]:\[\e[1;30;34m\]\w \[\e[1;30;47m\](\[\e[1;30;36m\]\$(TBytes) Mb\[\e[1;30;47m\])\$(__git_ps1 \" (%s)\")\[\e[0m\]\n\$ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment