Default Arch Linux .bashrc with some twists.
#
# /etc/profile.bash
# Global settings for bash shells
#
#PS1='[\u@\h \W]\$ '
PS1='\$ '
PS2='> '
PS3='> '
PS4='+ '
export PS1 PS2 PS3 PS4
#In the future we may want to add more ulimit entries here,
# in the offchance that /etc/security/limits.conf is skipped
ulimit -Sc 0 #Don't create core files
if test "$TERM" = "xterm" -o \
"$TERM" = "xterm-color" -o \
"$TERM" = "xterm-256color" -o \
"$TERM" = "rxvt" -o \
"$TERM" = "rxvt-unicode" -o \
"$TERM" = "xterm-xfree86"; then
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
export PROMPT_COMMAND
fi
###
### Bash Completion
###
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
###
### Various Settings
###
export MPD_HOST=archangel
###
### Some Aliases
###
alias ls="ls --color --group-directories-first"
alias ll="ls -lhF --color --group-directories-first"
alias la="ls -lahF --color --group-directories-first"
alias ..="cd .."
alias 2i="tupac -S"
alias 2u="tupac -Syu"
#alias 2q="tupac -Qs"
alias 2r="tupac -Rs"
#alias 2s="tupac -Ss"
2s () {
tupac -Ss $1 | less
}
2q () {
tupac -Qs $1
}
alias dl="cd /mnt/temp/Projects/Downloads"
alias p="ncmpc"
alias x="startx"
alias v="vlock"
alias m="mc"
alias s="sudo"
alias d="df -ah"
alias c="cmatrix"
alias l="locate"
alias y="centerim"
alias w="links google.com"
alias b="bwm-ng"
alias n="ncdu"
alias r="reboot"
alias h="halt"
###
### Handy Extract Program
###
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
*.tbz2) tar xvjf $1 ;;
*.tgz) tar xvzf $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
}
###
### Handy Daemons Commands
###
start()
{
for arg in $*
do
sudo /etc/rc.d/$arg start
done
}
stop()
{
for arg in $*
do
sudo /etc/rc.d/$arg stop
done
}
restart()
{
for arg in $*
do
sudo /etc/rc.d/$arg restart
done
}
reload()
{
for arg in $*
do
sudo /etc/rc.d/$arg reload
done
}
###
### Color Palette
###
if [ "$TERM" = "linux" ]; then
conpalette tango-dark
fi
###
### Compress with tar + bzip2
###
bz2 () {
tar cvpjf $1.tar.bz2 $1
}