Advertisement
jresendiz27

MyterminalPrompt

Oct 20th, 2013
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.00 KB | None | 0 0
  1. #fortune | cowsay -f tux
  2. #source /etc/profile
  3. #fortune | cowsay -f tux
  4. echo -e "\e[00;36m###########################################################\e[00m"
  5. echo -e "\e[00;36m#                                                     __  #\e[00m"
  6. echo -e "\e[00;36m#  _ _ _     _                      _____            |  | #\e[00m"
  7. echo -e "\e[00;36m# | | | |___| |___ ___ _____ ___   |  _  |___ ___ ___|  | #\e[00m"
  8. echo -e "\e[00;36m# | | | | -_| |  _| . |     | -_|  |   __| -_| . | . |__| #\e[00m"
  9. echo -e "\e[00;36m# |_____|___|_|___|___|_|_|_|___|  |__|  |___|  _|___|__| #\e[00m"
  10. echo -e "\e[00;36m#                                            |_|          #\e[00m"
  11. echo -e "\e[00;36m#    84 101  97 109 111  65 122 117 99 101 110 97 33      #\e[00m"
  12. echo -e "\e[00;36m###########################################################\e[00m"
  13. echo -e "\n"
  14. #THIS MUST BE AT THE END OF THE FILE FOR GVM TO WORK!!!
  15. #[[ -s "/home/ai2-27/.gvm/bin/gvm-init.sh" && -z $(which gvm-init.sh | grep '/gvm-init.sh') ]] && source "/home/ai2-27/.gvm/bin/gvm-init.sh"]]
  16. #source /home/ai2-27/.gvm/bin/gvm-init.sh
  17. export TERM=xterm-256color
  18. D=$'\e[00;37m'
  19. RED=$'\e[00;31m'
  20. GREEN=$'\e[00;32m'
  21. ORANGE=$'\e[00;33m'
  22.  
  23. fortune -a
  24.  
  25. function parse_git_dirty {
  26.   [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
  27. }
  28. function number_of_commits(){
  29. #    NUMOFLINES="$( git log --oneline 2> /dev/null | wc -l )"    
  30.     NUMOFLINES="$( git rev-list HEAD --count 2> /dev/null )"
  31.     echo $NUMOFLINES
  32. }
  33. function parse_git_branch {
  34.   git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[Branch : \1$(parse_git_dirty), # of commits : $(number_of_commits)]/"
  35. }
  36. function hg_ps1() {
  37.     hg prompt "{${D} on ${RED}{branch}}{${D} at ${ORANGE}{bookmark}}{${GREEN}{status}}" 2> /dev/null
  38. }
  39. #echo $(number_of_commits);
  40. #/home/ai2-27/Dropbox/Untitled/ESCOM/Analisis de Algoritmos/finalProject/2013b
  41.  
  42. export PS1='\n${RED}\u ${D}at ${ORANGE}\h ${D}in ${GREEN}\w${D} $(parse_git_branch)\n$ '
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement