Advertisement
lol

CrunchBang(CB)[Bash Script]

lol
Sep 20th, 2013
401
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.53 KB | None | 0 0
  1. # CrunchBang(CB) Bash Script
  2. # Some of the scripts here were pulled from
  3. # http://tldp.org/LDP/abs/html/sample-bashrc.html
  4.      
  5. #---------------------------------------------#    
  6. #        [ !! -Important- !! ]        #
  7. #---------------------------------------------#
  8.  
  9. #       !!!             BE SURE TO APPEND THIS TO ./bashrc      !!!!
  10. #
  11. #       if [ -f ~/.bashrc ]; then
  12. #       source ~/.CBBash
  13. #       fi
  14. #
  15. #       YOU WILL ALSO NEED TO CREATE './CBBash' './CBAlias' './CBFunctions'  
  16. #       IN /Home/User/
  17.  
  18.      
  19. #---------------------------------------------#    
  20. #           [ Start ]             #
  21. #---------------------------------------------#
  22.  
  23. # Source global definitions
  24. if [ -f /etc/bashrc ]; then
  25.        . /etc/bashrc
  26. fi
  27.  
  28.  
  29. export HISTCONTROL=ignoreboth
  30. export EDITOR="geany"
  31. export VISUAL="geany"
  32.  
  33. shopt -s histappend
  34. shopt -s checkwinsize
  35.  
  36. # Make less more friendly for non-text input files, see lesspipe(1)
  37. [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
  38.  
  39. # Set variable identifying the chroot you work in (used in the prompt below)
  40. if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
  41.     debian_chroot=$(cat /etc/debian_chroot)
  42. fi
  43.  
  44. #---------------------------------------------#    
  45. #              [ Prompt ]             #
  46. #---------------------------------------------#
  47.  
  48. # If not running interactively, don't do anything
  49. [ -z "$PS1" ] && return
  50.  
  51. force_color_prompt=yes
  52.  
  53. PROMPT_COLOR='35;1m'
  54.  
  55. # If this is an xterm set the title to user@host:dir
  56. case "$TERM" in
  57. xterm*|rxvt*)
  58.     PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
  59.     ;;
  60. *)
  61.     ;;
  62. esac
  63.  
  64. # enable programmable completion features (you don't need to enable
  65. # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
  66. # sources /etc/bash.bashrc).
  67. if [ -f /etc/bash_completion ]; then
  68.     . /etc/bash_completion
  69. fi
  70.  
  71. #---------------------------------------------#    
  72. #           [ Shell Options ]         #
  73. #---------------------------------------------#
  74.  
  75. set -o noclobber
  76.  
  77. # Color definitions (taken from Color Bash Prompt HowTo).
  78. # Some colors might look different of some terminals.
  79.  
  80. #---------------------------------------------#    
  81. #       [ Normal Colours ]        #
  82. #---------------------------------------------#
  83.  
  84. Black='\e[0;30m'        # Black
  85. Red='\e[0;31m'          # Red
  86. Green='\e[0;32m'        # Green
  87. Yellow='\e[0;33m'       # Yellow
  88. Blue='\e[0;34m'         # Blue
  89. Purple='\e[0;35m'       # Purple
  90. Cyan='\e[0;36m'         # Cyan
  91. White='\e[0;37m'        # White
  92.  
  93. #---------------------------------------------#    
  94. #       [ Bold Colours ]          #
  95. #---------------------------------------------#
  96.  
  97. BBlack='\e[1;30m'       # Black
  98. BRed='\e[1;31m'         # Red
  99. BGreen='\e[1;32m'       # Green
  100. BYellow='\e[1;33m'      # Yellow
  101. BBlue='\e[1;34m'        # Blue
  102. BPurple='\e[1;35m'      # Purple
  103. BCyan='\e[1;36m'        # Cyan
  104. BWhite='\e[1;37m'       # White
  105.  
  106. #---------------------------------------------#    
  107. #       [ Background Colours ]        #
  108. #---------------------------------------------#
  109.  
  110. On_Black='\e[40m'       # Black
  111. On_Red='\e[41m'         # Red
  112. On_Green='\e[42m'       # Green
  113. On_Yellow='\e[43m'      # Yellow
  114. On_Blue='\e[44m'        # Blue
  115. On_Purple='\e[45m'      # Purple
  116. On_Cyan='\e[46m'        # Cyan
  117. On_White='\e[47m'       # White
  118.  
  119. NC="\e[m"               # Color Reset
  120.  
  121. export IRCNAME="pwnsauce_"
  122. export PS1="${Red}[${Yellow}*${Red}]${Yellow}\u${Black}@${Yellow}\h"
  123. export PATH="$PATH:~/bin:~/scripts"
  124.      
  125. #---------------------------------------------#    
  126. #       [ Visuals ]           #
  127. #---------------------------------------------#
  128.  
  129. clear
  130. echo -e "
  131.    ${Black}/${Red}## ${Black}/${Red}##    ${Black}/${Red}##
  132.   ${Black}/ ${Red}##${Black}/ ${Red}##   ${Black}! ${Red}##
  133.  ${Black}/${Red}########## ${Black}! ${Red}##
  134. ${Black}!   ${Red}##  ##${Black}_/ ! ${Red}##   ${Red}[${Black}*${Red}]  ${Black}CrunchBang(${Red}CB${Black})${Black} Bash Script  ${Red}[${Black}*${Red}]${NC}
  135.  ${Black}/${Red}########## ${Black}!__/
  136. ${Black}!_  ${Red}##  ##${Black}_/  
  137.   ${Black}! ${Red}##${Black}! ${Red}##    ${Black}/${Red}##
  138.   ${Black}!__/!__/   !__/${NC}"
  139. echo -e ""
  140. echo -e ""
  141.  
  142. #---------------------------------------------#    
  143. #         [ Aliases ]             #
  144. #---------------------------------------------#
  145.  
  146. if [ -f ~/.CBBash ]; then
  147.     source ~/.CBAlias
  148.     fi
  149.  
  150. #---------------------------------------------#    
  151. #         [ Functions ]           #
  152. #---------------------------------------------#
  153.  
  154. if [ -f ~/.CBBash ]; then
  155.     source ~/.CBFunctions
  156.     fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement