Advertisement
corrosiontears

Bashrc usuário Manjaro (Personalizado)

Feb 13th, 2015
719
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.61 KB | None | 0 0
  1. ## Bashrc Personalizado Manjaro
  2. # Baseado no original com algumas personalizações
  3.  
  4. if [ -f /etc/bash_completion ]; then
  5.         . /etc/bash_completion
  6. fi
  7.  
  8. xhost +local:root > /dev/null 2>&1
  9.  
  10. complete -cf sudo
  11.  
  12. shopt -s cdspell
  13. shopt -s checkwinsize
  14. shopt -s cmdhist
  15. shopt -s dotglob
  16. shopt -s expand_aliases
  17. shopt -s extglob
  18. shopt -s histappend
  19. shopt -s hostcomplete
  20.  
  21. export HISTSIZE=10000
  22. export HISTFILESIZE=${HISTSIZE}
  23. export HISTCONTROL=ignoreboth
  24. export JAVA_FONTS=/usr/share/fonts/TTF
  25. export EDITOR=/usr/bin/nano
  26.  
  27. alias screenfetch="screenfetch -E"
  28. alias screenfetch-scrot="screenfetch -E -s"
  29. alias cls="clean"
  30. alias ls='ls --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
  31. alias ll='ls -l --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
  32. alias la='ls -la --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
  33. alias grep='grep --color=tty -d skip'
  34. alias cp="cp -i"                          # confirm before overwriting something
  35. alias df='df -h'                          # human-readable sizes
  36. alias free='free -m'                      # show sizes in MB
  37. alias np='nano PKGBUILD'
  38. alias fixit='sudo rm -f /var/lib/pacman/db.lck && sudo pacman-mirrors -g && sudo pacman -Syyuu  &&
  39. sudo pacman -Suu'
  40.  
  41. # Optimized yaourt:
  42. alias yaconf='yaourt -C'        # Fix all configuration files with vimdiff
  43. alias yaupg='yaourt -Syua'        # Synchronize with repositories before upgrading packages (AUR packages too) that are out of date on the local system.
  44. alias yasu='yaourt --sucre'      # Same as yaupg, but without confirmation
  45. alias yain='yaourt -S'           # Install specific package(s) from the repositories
  46. alias yains='yaourt -U'          # Install specific package not from the repositories but from a file
  47. alias yare='yaourt -R'           # Remove the specified package(s), retaining its configuration(s) and required dependencies
  48. alias yarem='yaourt -Rns'        # Remove the specified package(s), its configuration(s) and unneeded dependencies
  49. alias yarep='yaourt -Si'         # Display information about a given package in the repositories
  50. alias yareps='yaourt -Ss'        # Search for package(s) in the repositories
  51. alias yaloc='yaourt -Qi'         # Display information about a given package in the local database
  52. alias yalocs='yaourt -Qs'        # Search for package(s) in the local database
  53. alias yalst='yaourt -Qe'         # List installed packages, even those installed from AUR (they're tagged as "local")
  54. alias yaorph='yaourt -Qtd'       # Remove orphans using yaourt
  55. alias yaupd='yaourt -Sy && sudo abs'   # Update and refresh the local package and ABS databases against repositories
  56. alias yainsd='yaourt -S --asdeps'        # Install given package(s) as dependencies of another package
  57. alias yamir='yaourt -Syy'                # Force refresh of all package lists after updating
  58.  
  59.  
  60. # ex - archive extractor
  61. # usage: ex <file>
  62. ex ()
  63. {
  64.   if [ -f $1 ] ; then
  65.     case $1 in
  66.       *.tar.bz2)   tar xjf $1   ;;
  67.       *.tar.gz)    tar xzf $1   ;;
  68.       *.bz2)       bunzip2 $1   ;;
  69.       *.rar)       unrar x $1     ;;
  70.       *.gz)        gunzip $1    ;;
  71.       *.tar)       tar xf $1    ;;
  72.       *.tbz2)      tar xjf $1   ;;
  73.       *.tgz)       tar xzf $1   ;;
  74.       *.zip)       unzip $1     ;;
  75.       *.Z)         uncompress $1;;
  76.       *.7z)        7z x $1      ;;
  77.       *)           echo "'$1' cannot be extracted via ex()" ;;
  78.     esac
  79.   else
  80.     echo "'$1' is not a valid file"
  81.   fi
  82. }
  83.  
  84. # prompt
  85. #PS1='[\u@\h \W]\$ ' # Default
  86. PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\] \[\e[1;92m\]' # Light Green
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement