Advertisement
Algabe

welcome_arch

Feb 4th, 2014
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.00 KB | None | 0 0
  1. # Welcome Message
  2. # Arch Linux Logo Welcome Message
  3. c1="$(tput sgr0)$(tput setaf 4)"
  4. c2="$(tput bold)$(tput setaf 4)"
  5. c3="$(tput bold)$(tput setaf 7)"
  6. echo "        $c2,$c1                       _     _ _"
  7. echo "       $c2/$c1#$c2\\$c1        __ _ _ __ ___| |__ | (_)_ __  _   ___  __"
  8. echo "      $c2/$c1###$c2\\$c1      / _\` | '__/ __| '_ \\| | | '_ \\| | | \\ \\/ /"
  9. echo "     $c2/$c1#####$c2\\$c1    | (_| | | | (__| | | | | | | | | |_| |>  <"
  10. echo "    $c2/$c1##,-,##$c2\\$c1    \\__,_|_|  \\___|_| |_|_|_|_| |_|\\__,_/_/\\_\\"
  11. echo "   $c2/$c1##(   )##$c2\\$c1"
  12. echo "  $c2/$c1#.--   --.#$c2\\  $c3 A simple, elegant GNU/Linux distribution."
  13. echo " $c2/$c1\`           \`$c2\\$(tput sgr0)"$'\n'
  14.  
  15. # Show date
  16. DATE="$(tput setaf 1)[$(tput setaf 6)$(date)"
  17. DATE="${DATE}$(tput setaf 1)]"
  18. echo $DATE
  19. # Show kernel info
  20. KERNEL="$(tput setaf 1)[$(tput setaf 6)$(uname -srmn)"
  21. KERNEL="${KERNEL}$(tput setaf 1)]"
  22. echo "$KERNEL"$'\n'
  23. # Reset colors
  24. tput sgr0
  25.  
  26.  
  27. # sanitize TERM:
  28. safe_term=${TERM//[^[:alnum:]]/?}
  29. match_lhs=""
  30.  
  31. [[ -z ${match_lhs} ]] \
  32.         && type dircolors >/dev/null \
  33.         && match_lhs=$(dircolors --print-database)
  34.  
  35. if [[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] ; then
  36.  
  37.         # we have colors <img src="http://obihoernchen.net/wordpress/wp-includes/images/smilies/icon_smile.gif" alt=":-)" class="wp-smiley">
  38.  
  39.         # Enable colors for ls, etc. Prefer ~/.dir_colors
  40.         if type dircolors >/dev/null ; then
  41.                 if [[ -f ~/.dir_colors ]] ; then
  42.                         eval $(dircolors -b ~/.dir_colors)
  43.                 elif [[ -f /etc/DIR_COLORS ]] ; then
  44.                         eval $(dircolors -b /etc/DIR_COLORS)
  45.                 fi
  46.         fi
  47.  
  48.         # -- CUSTOM PS1 String START --
  49.  
  50.         #PS1="\[\033[0;37m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[0;31m\]\u\[\033[0;37m\]@\[\033[0;96m\]\h'; else echo '\[\033[0;33m\]\u\[\033[0;37m\]@\[\033[0;96m\]\h'; fi)\[\033[0;37m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;37m\]]\n\[\033[0;37m\]\342\224\224\342\224\200\342\224\200\076 \[\033[0m\]"
  51.         # --- Custom PS1 String END ---
  52.  
  53.         # Use this other PS1 string if you want \W for root and \w for all other users:
  54.         # PS1="$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]\h\[\033[01;34m\] \W'; else echo '\[\033[01;32m\]\u@\h\[\033[01;34m\] \w'; fi) \$([[ \$? != 0 ]] && echo \"\[\033[01;31m\]:(\[\033[01;34m\] \")\$\[\033[00m\] "
  55.  
  56.         alias ls="ls --color=auto"
  57.         alias dir="dir --color=auto"
  58.         alias grep="grep --colour=auto"
  59.  
  60. else
  61.  
  62.         # show root@ when we do not have colors
  63.  
  64.         PS1="\u@\h \w \$([[ \$? != 0 ]] && echo \":( \")\$ "
  65.  
  66.         # Use this other PS1 string if you want \W for root and \w for all other users:
  67.         # PS1="\u@\h $(if [[ ${EUID} == 0 ]]; then echo '\W'; else echo '\w'; fi) \$([[ \$? != 0 ]] && echo \":( \")\$ "
  68.  
  69. fi
  70.  
  71. PS2="> "
  72. PS3="> "
  73. PS4="+ "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement