Created
January 19, 2011 02:14
-
-
Save aterrel/785566 to your computer and use it in GitHub Desktop.
Relevant bash for my prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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