Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

"elite" bash prompt

By: a guest on Jul 18th, 2012  |  syntax: None  |  size: 0.75 KB  |  views: 25  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function elite()
  2. {
  3.  
  4. local GRAY="\[\033[1;30m\]"
  5. local LIGHT_GRAY="\[\033[0;37m\]"
  6. local CYAN="\[\033[0;36m\]"
  7. local LIGHT_CYAN="\[\033[1;36m\]"
  8. local NO_COLOUR="\[\033[0m\]"
  9.  
  10. case $TERM in
  11.     xterm*|rxvt*)
  12.         local TITLEBAR='\[\033]0;\u@\h:\w\007\]'
  13.         ;;
  14.     *)
  15.         local TITLEBAR=""
  16.         ;;
  17. esac
  18.  
  19. local temp=$(tty)
  20. local GRAD1=${temp:5}
  21. PS1="$TITLEBAR\
  22. $GRAY-$CYAN-$LIGHT_CYAN(\
  23. $CYAN\u$GRAY@$CYAN\h\
  24. $LIGHT_CYAN)$CYAN-$LIGHT_CYAN(\
  25. $CYAN\#$GRAY/$CYAN$GRAD1\
  26. $LIGHT_CYAN)$CYAN-$LIGHT_CYAN(\
  27. $CYAN\$(date +%H%M)$GRAY/$CYAN\$(date +%d-%b-%y)\
  28. $LIGHT_CYAN)$CYAN-$GRAY-\
  29. $LIGHT_GRAY\n\
  30. $GRAY-$CYAN-$LIGHT_CYAN(\
  31. $CYAN\$$GRAY:$CYAN\w\
  32. $LIGHT_CYAN)$CYAN-$GRAY-$LIGHT_GRAY "
  33. PS2="$LIGHT_CYAN-$CYAN-$GRAY-$NO_COLOUR "
  34. }
clone this paste RAW Paste Data