Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Check for an interactive session
- [ -z "$PS1" ] && return
- # enable bash-completion
- if [ -f /etc/bash_completion ]; then
- . /etc/bash_completion
- fi
- # bash options
- shopt -s checkwinsize # update the value of LINES and COLUMNS after each command if altered
- alias record='ffmpeg -f x11grab -r 25 -s 1280x800 -i :0.0 $1'
- # aliases
- alias mysqls='sudo /etc/rc.d/mysqld'
- alias apache='sudo /etc/rc.d/httpd'
- alias server='mysqls restart & apache restart'
- #alias kdebk='cp -R ~/.kde4/ ~/.kde4bak'
- alias n64='cd ~/Desktop/Games/n64'
- alias ls='ls --color=auto'
- #alias pacman='sudo pacman-color'
- alias grep='grep --color=auto'
- alias cp="cp -i" # confirm before overwriting something
- alias psm="echo '%CPU %MEM PID COMMAND' && ps hgaxo %cpu,%mem,pid,comm | sort -nrk1 | head -n 10 | sed -e 's/-bin//' |
- sed -e 's/-media-play//'"
- alias pacs="pacman -Sl | cut -d' ' -f2 | grep " #
- alias pac="pacsearch" # colorize pacman (pacs)
- pacsearch ()
- {
- echo -e "$(pacman -Ss $@ | sed \
- -e 's#core/.*#\\033[1;31m&\\033[0;37m#g' \
- -e 's#extra/.*#\\033[0;32m&\\033[0;37m#g' \
- -e 's#community/.*#\\033[1;35m&\\033[0;37m#g' \
- -e 's#^.*/.* [0-9].*#\\033[0;36m&\\033[0;37m#g' )"
- }
- extract () {
- if [ -f $1 ] ; then
- case $1 in
- *.tar.bz2) tar xjf $1 ;;
- *.tar.gz) tar xzf $1 ;;
- *.bz2) bunzip2 $1 ;;
- *.rar) rar x $1 ;;
- *.gz) gunzip $1 ;;
- *.tar) tar xf $1 ;;
- *.tbz2) tar xjf $1 ;;
- *.tgz) tar xzf $1 ;;
- *.zip) unzip $1 ;;
- *.Z) uncompress $1 ;;
- *.7z) 7z x $1 ;;
- *) echo "'$1' cannot be extracted via extract()" ;;
- esac
- else
- echo "'$1' is not a valid file"
- fi
- }
- # env vars
- export EDITOR=/usr/bin/vim
- PS1='[\[\e[37m\]\u\[\e[31m\]@\[\e[37m\]\h\[\e[0m\]:\[\e[33m\]\w\[\e[0m\]] \$ '
- #whatis $(ls ${PATH//:/ } 2>/dev/null| shuf -n 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement