Advertisement
bee1k

Bashrc with calander

Jul 23rd, 2012
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. ## Chris's ~/.bashrc
  2.  
  3. # Define a few Colours
  4. BLACK='\e[0;30m'
  5. BLUE='\e[0;34m'
  6. GREEN='\e[0;32m'
  7. CYAN='\e[0;36m'
  8. RED='\e[0;31m'
  9. PURPLE='\e[0;35m'
  10. BROWN='\e[0;33m'
  11. LIGHTGRAY='\e[0;37m'
  12. DARKGRAY='\e[1;30m'
  13. LIGHTBLUE='\e[1;34m'
  14. LIGHTGREEN='\e[1;32m'
  15. LIGHTCYAN='\e[1;36m'
  16. LIGHTRED='\e[1;31m'
  17. LIGHTPURPLE='\e[1;35m'
  18. YELLOW='\e[1;33m'
  19. WHITE='\e[1;37m'
  20. NC='\e[0m' # No Color
  21.  
  22. ## Some Basics
  23. export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
  24. export HISTCONTROL=ignoreboth
  25. shopt -s histappend
  26. shopt -s checkwinsize
  27.  
  28. # make less more friendly for non-text input files, see lesspipe(1)
  29. [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
  30.  
  31.  
  32. ## Setup Prompt
  33. PS1="${BLUE}(${RED}\W${BLUE}) ${NORMAL}\h ${RED}\$ ${NC}"
  34.  
  35.  
  36. # If this is an xterm set the title to user@host:dir
  37. case "$TERM" in
  38. xterm*|rxvt*)
  39. PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
  40.  
  41. ;;
  42. *)
  43. ;;
  44. esac
  45.  
  46.  
  47. # Aliases
  48. alias ls='ls --color=auto'
  49. alias ll='ls -l --color=auto'
  50. alias la='ls -A --color=auto'
  51. alias l='ls -CF --color=auto'
  52. alias ..='cd ..'
  53. alias gerp='grep --color=auto'
  54. alias del='rm --target-directory=$HOME/.Trash/'
  55.  
  56. # Bash Completion
  57. if [ -f /etc/bash_completion ]; then
  58. . /etc/bash_completion
  59. fi
  60.  
  61. # Functions
  62. extract () {
  63. if [ -f $1 ] ; then
  64. case $1 in
  65. *.tar.bz2) tar xjf $1 ;;
  66. *.tar.gz) tar xzf $1 ;;
  67. *.bz2) bunzip2 $1 ;;
  68. *.rar) rar x $1 ;;
  69. *.gz) gunzip $1 ;;
  70. *.tar) tar xf $1 ;;
  71. *.tbz2) tar xjf $1 ;;
  72. *.tgz) tar xzf $1 ;;
  73. *.zip) unzip $1 ;;
  74. *.Z) uncompress $1 ;;
  75. *) echo "'$1' cannot be extracted via extract()" ;;
  76. esac
  77. else
  78. echo "'$1' is not a valid file"
  79. fi
  80. }
  81.  
  82.  
  83. # WELCOME SCREEN
  84. ################################################## #####
  85.  
  86. clear
  87.  
  88. echo -ne "${LIGHTBLUE}" "Hello, $USER. Today is, "; date
  89. echo -e "${BLACK}"; cal -3;
  90. #echo -ne "${CYAN}";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement