granada

Bashrc

Mar 10th, 2012
187
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. #
  3. # ~/.bashrc
  4. #
  5.  
  6. #Welcome msg
  7. echo '   _ '
  8. echo '  °v° ** Bem-vindo a '`hostname`' **'
  9. echo ' /(_)\ '
  10. echo '  ^ ^ ' `date`
  11. echo ' '
  12.  
  13. # If not running interactively, don't do anything
  14. [[ $- != *i* ]] && return
  15.  
  16. # Source scripts in /etc/X11/xinit/xinitrc.d/
  17. #if [ -d /etc/X11/xinit/xinitrc.d ]; then
  18. #    for f in /etc/X11/xinit/xinitrc.d/*; do
  19. #        [ -x "$f" ] && . "$f"
  20. #    done
  21. #    unset f
  22. #fi
  23.  
  24. export EDITOR="nano"
  25. export VISUAL="nano"
  26.  
  27. alias ls='ls --color=auto'
  28. alias xterm='xterm -fg white -bg black -geom 80x24 -T xterm -e /usr/bin/pre-exec /usr/bin/fader 0.7'
  29. alias pcmanfm='pcmanfm --no-desktop &'
  30. alias xinit='xinit &'
  31. alias halt='sudo halt'
  32. alias reboot='sudo reboot'
  33.  
  34. extract() {
  35.     local c e i
  36.  
  37.     (($#)) || return
  38.  
  39.     for i; do
  40.         c=''
  41.         e=1
  42.  
  43.         if [[ ! -r $i ]]; then
  44.             echo "$0: file is unreadable: \`$i'" >&2
  45.            continue
  46.        fi
  47.  
  48.        case $i in
  49.        #*.t@(gz|lz|xz|b@(2|z?(2))|a@(z|r?(.@(Z|bz?(2)|gz|lzma|xz)))))
  50.        #       c='bsdtar xvf';;
  51.        *.7z)  c='7z x';;
  52.        *.Z)   c='uncompress';;
  53.        *.bz2) c='bunzip2';;
  54.        *.exe) c='cabextract';;
  55.        *.gz)  c='gunzip';;
  56.        *.rar) c='unrar x';;
  57.        *.xz)  c='unxz';;
  58.        *.zip) c='unzip';;
  59.        *)     echo "$0: unrecognized file extension: \`$i'" >&2
  60.                continue;;
  61.         esac
  62.  
  63.         command $c "$i"
  64.         e=$?З
  65.     done
  66.  
  67.     return $e
  68. }
  69.  
  70. # Mapa de Teclado
  71. setxkbmap -model abnt2 -layout br -variant abnt2
  72. setxkbmap -option terminate:ctrl_alt_bksp
  73.  
  74. # Regular Colors
  75. Black='\e[0;30m'        # Black
  76. Red='\e[0;31m'          # Red
  77. Green='\e[0;32m'        # Green
  78. Yellow='\e[0;33m'       # Yellow
  79. Blue='\e[0;34m'         # Blue
  80. Purple='\e[0;35m'       # Purple
  81. Cyan='\e[0;36m'         # Cyan
  82. White='\e[0;37m'        # White
  83.  
  84. #LE COOL
  85. PS1="\[\e[01;31m\]┌─[\[\e[01;36m\u\e[01;31m\]]──[\[\e[01;32m\]${HOSTNAME%%.*}\[\e[01;31m\]]──[\[\033[1;33m\]\w\[\033[1;31m\]]-\[\e[01;33m\]$\[\e[01;31m\]\n\[\e[01;31m\]└──\[\e[01;92m\]>>\[\e[0m\]"
RAW Paste Data