################################## # jesse's bashrc # www.geekosphere.org # # last change: 25.04.2007 ################################## # # this is gentoo optimized, some # fancy stuff might not work otb # # current dependencies: # - app-admin/pydf # - app-misc/colordiff # - app-misc/mc # - app-misc/screen (must!) # - app-portage/gentoolkit # - app-shells/bash-completion # - sys-apps/most ################################## # screen/user fix chmod -R 777 /dev/pts/* # standard stuff source /etc/profile source /etc/bash_completion eval `dircolors -b /etc/DIR_COLORS` export LANG="de_DE.utf8" export PAGER="most" # teh fancy prompt DARKBLUE='\033[0;34m' BLUE='\033[1;34m' WHITE='\033[0;39m' WHITEB='\033[0;1;39m' RED='\033[0;31m' PS1="\n\[${DARKBLUE}\][\[${BLUE}\]\t\[${DARKBLUE}\]] \[${WHITE}\]\u\[${DARKBLUE}\][\[${BLUE}\]tty\l\[${DARKBLUE}\]]\[${WHITE}\]\w \[${RED}\]$\[${WHITEB}\] " # pretty directory listings alias d="ls --color -h" alias ls="ls --color=auto -h" alias ll="ls --color -l -h" alias la="ls --color -a -h" alias lal="ls --color -a -l -h" alias lrt="ls -lrt" alias lsd="ls -F | ls -d */" alias lsp="ls *.c *.h *.cc *.pl *.pm" alias l="dir" alias lx="ls -Fsh" alias dir="pwd; ls;ls | wc -w" alias csize="du -k | sort -r -n | more" # other useful stuff alias du="du -h" alias df="pydf -h" alias cp="cp -i" alias mv="mv -i" alias rm="rm -i" alias cd..="cd .." alias ..="cd .." alias ...="cd ../.." alias ....="cd ../../.." alias pwd="/bin/pwd" alias n="nano -w" alias mce="mcedit" alias mkdir="mkdir -p" alias diff="colordiff" alias x="clear && exit" alias q="exit" alias free="du -h --max-depth=1 /" alias blank="echo < /dev/null >" alias grep="grep --color=auto" alias h="history" alias rgrep="find . -name "*" | xargs grep" alias sc="screen -x" alias upgrade="eix-sync && update-eix" alias timeleft="genlop -c" alias backupsql="mysqldump -u root -p --opt $1 > ~/$1.sql" alias pcheck="fuser -n tcp" alias pi="pastebinit.py -a jesse -i" # show useflag description function usedesc() { cat /usr/portage/profiles/use.* | egrep -i $1 } # grep for active process function psgrep() { ps aux | grep -e $1 } # Change the window title of X terminals case $TERM in xterm*|rxvt|Eterm|eterm) PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"' ;; screen) PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"' ;; esac # keep active directory when leaving mc if [ -f /usr/share/mc/mc.gentoo ]; then . /usr/share/mc/mc.gentoo fi # weeee if [ $TERM = "linux" ] then /usr/bin/unicode_start fi # it gets pretty fancy from here, still testing ;) # uncomment and take a look ;-) #BLACK='\e[0;30m' #BLUE='\e[0;34m' #GREEN='\e[0;32m' #CYAN='\e[0;36m' #RED='\e[0;31m' #PURPLE='\e[0;35m' #BROWN='\e[0;33m' #LIGHTGRAY='\e[0;37m' #DARKGRAY='\e[1;30m' #LIGHTBLUE='\e[1;34m' #LIGHTGREEN='\e[1;32m' #LIGHTCYAN='\e[1;36m' #LIGHTRED='\e[1;31m' #LIGHTPURPLE='\e[1;35m' #YELLOW='\e[1;33m' #WHITE='\e[1;37m' #NC='\e[0m' # No Color #spin () #{ # echo -ne "${RED}-" # echo -ne "${WHITE}\b|" # echo -ne "${BLUE}\bx" # sleep .05 # echo -ne "${RED}\b+${NC}" #} ##echo -ne " "; for i in `seq 1 27` ; do spin; done ;echo -ne "${WHITE} `fortune` ${NC}"; for i in `seq 1 27` ; #echo -ne " "; for i in `seq 1 27` ; do spin; done ;echo -ne "${WHITE} hacking is not a crime! ${NC}"; for i in `seq 1 27` ; #do spin; #done ;echo ""; echo ""; #EOF