KekSec

freaky bashrc file

Aug 25th, 2015
580
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.52 KB | None | 0 0
  1. # System-wide .bashrc file for interactive bash(1) shells.
  2.  
  3. # To enable the settings / commands in this file for login shells as well,
  4. # this file has to be sourced in /etc/profile.
  5.  
  6. # If not running interactively, don't do anything
  7. [ -z "$PS1" ] && return
  8.  
  9. # check the window size after each command and, if necessary,
  10. # update the values of LINES and COLUMNS.
  11. shopt -s checkwinsize
  12.  
  13. # set variable identifying the chroot you work in (used in the prompt below)
  14. if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
  15. debian_chroot=$(cat /etc/debian_chroot)
  16. fi
  17.  
  18. alias ll='ls -al'
  19.  
  20. use_color=false
  21.  
  22. # Set colorful PS1 only on colorful terminals.
  23. # dircolors --print-database uses its own built-in database
  24. # instead of using /etc/DIR_COLORS. Try to use the external file
  25. # first to take advantage of user additions. Use internal bash
  26. # globbing instead of external grep binary.
  27. safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM
  28. match_lhs=""
  29. [[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
  30. [[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
  31. [[ -z ${match_lhs} ]] \
  32. && type -P dircolors >/dev/null \
  33. && match_lhs=$(dircolors --print-database)
  34. [[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true
  35.  
  36. if ${use_color} ; then
  37. # Enable colors for ls, etc. Prefer ~/.dir_colors #64489
  38. if type -P dircolors >/dev/null ; then
  39. if [[ -f ~/.dir_colors ]] ; then
  40. eval $(dircolors -b ~/.dir_colors)
  41. elif [[ -f /etc/DIR_COLORS ]] ; then
  42. eval $(dircolors -b /etc/DIR_COLORS)
  43. else
  44. eval $(dircolors)
  45. fi
  46. fi
  47.  
  48. if [[ ${EUID} == 0 ]] ; then
  49. PS1=' '
  50. else
  51. PS1=' '
  52. fi
  53.  
  54. alias ls='ls --color=auto'
  55. alias grep='grep --colour=auto'
  56. else
  57. if [[ ${EUID} == 0 ]] ; then
  58. # show root@ when we don't have colors
  59. PS1=' '
  60. else
  61. PS1=' '
  62. fi
  63. fi
  64.  
  65. # Try to keep environment pollution down, EPA loves us.
  66. unset use_color safe_term match_lhs
  67.  
  68. # Commented out, don't overwrite xterm -T "title" -n "icontitle" by default.
  69. # If this is an xterm set the title to user@host:dir
  70. #case "$TERM" in
  71. #xterm*|rxvt*)
  72. PROMPT_COMMAND='echo -ne "\n\033[1;36m/--\033[1;35m[\033[1;32m$(whoami)\033[1;35m]\033[1;36m---<\033[1;35m[\033[1;31m<3\033[1;35m]\033[1;36m>---<\033[1;35m[\033[1;32m$(hostname)\033[1;35m]\033[1;36m>>\n\--\033[1;35m[\033[1;36m$(pwd)\033[1;35m]\033[1;36m=>\033[0;32m"'
  73. # ;;
  74. #*)
  75. # ;;
  76. #esac
  77.  
  78. # enable bash completion in interactive shells
  79. if [ -f /etc/bash_completion ]; then
  80. . /etc/bash_completion
  81. fi
  82.  
  83. # if the command-not-found package is installed, use it
  84. if [ -x /usr/lib/command-not-found ]; then
  85. function command_not_found_handle {
  86. # check because c-n-f could've been removed in the meantime
  87. if [ -x /usr/lib/command-not-found ]; then
  88. /usr/bin/python /usr/lib/command-not-found -- $1
  89. return $?
  90. else
  91. return 127
  92. fi
  93. }
  94. fi
  95.  
  96. /usr/bin/mint-fortune
  97. echo -e "\033[1;32m"
  98. echo '___________ __ '
  99. echo '\_ _____/______ ____ _____ | | __'
  100. echo ' | __) \_ __ \_/ __ \\__ \ | |/ /'
  101. echo ' | \ | | \/\ ___/ / __ \| < '
  102. echo ' \___ / |__| \___ >____ /__|_ \'
  103. echo ' \/ \/ \/ \/'
  104. echo -e "\033[1;31m"
  105. echo `uptime`
  106. echo -e "\033[0m"
Advertisement
Add Comment
Please, Sign In to add comment