Advertisement
KaeruCT

bashrc

Nov 5th, 2011
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1.  
  2. # Check for an interactive session
  3. [ -z "$PS1" ] && return
  4.  
  5. # enable bash-completion
  6. if [ -f /etc/bash_completion ]; then
  7. . /etc/bash_completion
  8. fi
  9.  
  10. # bash options
  11. shopt -s checkwinsize # update the value of LINES and COLUMNS after each command if altered
  12.  
  13. alias record='ffmpeg -f x11grab -r 25 -s 1280x800 -i :0.0 $1'
  14.  
  15. # aliases
  16. alias mysqls='sudo /etc/rc.d/mysqld'
  17. alias apache='sudo /etc/rc.d/httpd'
  18. alias server='mysqls restart & apache restart'
  19.  
  20. #alias kdebk='cp -R ~/.kde4/ ~/.kde4bak'
  21.  
  22. alias n64='cd ~/Desktop/Games/n64'
  23. alias ls='ls --color=auto'
  24. #alias pacman='sudo pacman-color'
  25. alias grep='grep --color=auto'
  26. alias cp="cp -i" # confirm before overwriting something
  27. alias psm="echo '%CPU %MEM PID COMMAND' && ps hgaxo %cpu,%mem,pid,comm | sort -nrk1 | head -n 10 | sed -e 's/-bin//' |
  28. sed -e 's/-media-play//'"
  29. alias pacs="pacman -Sl | cut -d' ' -f2 | grep " #
  30. alias pac="pacsearch" # colorize pacman (pacs)
  31. pacsearch ()
  32. {
  33. echo -e "$(pacman -Ss $@ | sed \
  34. -e 's#core/.*#\\033[1;31m&\\033[0;37m#g' \
  35. -e 's#extra/.*#\\033[0;32m&\\033[0;37m#g' \
  36. -e 's#community/.*#\\033[1;35m&\\033[0;37m#g' \
  37. -e 's#^.*/.* [0-9].*#\\033[0;36m&\\033[0;37m#g' )"
  38. }
  39. extract () {
  40. if [ -f $1 ] ; then
  41. case $1 in
  42. *.tar.bz2) tar xjf $1 ;;
  43. *.tar.gz) tar xzf $1 ;;
  44. *.bz2) bunzip2 $1 ;;
  45. *.rar) rar x $1 ;;
  46. *.gz) gunzip $1 ;;
  47. *.tar) tar xf $1 ;;
  48. *.tbz2) tar xjf $1 ;;
  49. *.tgz) tar xzf $1 ;;
  50. *.zip) unzip $1 ;;
  51. *.Z) uncompress $1 ;;
  52. *.7z) 7z x $1 ;;
  53. *) echo "'$1' cannot be extracted via extract()" ;;
  54. esac
  55. else
  56. echo "'$1' is not a valid file"
  57. fi
  58. }
  59.  
  60. # env vars
  61. export EDITOR=/usr/bin/vim
  62. PS1='[\[\e[37m\]\u\[\e[31m\]@\[\e[37m\]\h\[\e[0m\]:\[\e[33m\]\w\[\e[0m\]] \$ '
  63. #whatis $(ls ${PATH//:/ } 2>/dev/null| shuf -n 1)
  64.  
  65.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement