dotfiles
view .bashrc @ 13:a72d02acbab2
added clickable links in urxvt
author | meillo@marmaro.de |
---|---|
date | Wed, 09 Jan 2008 10:13:43 +0100 |
parents | d339ec9b6545 |
children |
line source
1 # markus schnalke -- http://marmaro.de
2 #
3 # modified standard bashrc of debian sarge
4 #
6 export LANG=en_US.UTF-8
8 # ~/.bashrc: executed by bash(1) for non-login shells.
9 # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
10 # for examples
12 # If not running interactively, don't do anything:
13 [ -z "$PS1" ] && return
16 # check the window size after each command and, if necessary,
17 # update the values of LINES and COLUMNS.
18 shopt -s checkwinsize
21 # enable colored ls output
22 eval "`dircolors -b $HOME/.dircolorsrc`"
25 # one history for all
26 shopt -s histappend
27 PROMPT_COMMAND='history -a'
28 export HISTCONTROL=ignoredups
29 # larger history
30 export HISTSIZE=100000
31 export HISTFILESIZE=$HISTSIZE
34 # enable programmable completion features (you don't need to enable
35 # this, if it's already enabled in /etc/bash.bashrc and /etc/profiles
36 # sources /etc/bash.bashrc).
37 if [ -f /etc/bash_completion ]; then
38 . /etc/bash_completion
39 fi
42 # vars
44 export PATH=$PATH:/home/meillo/Prog/Shell/bin
46 export VISUAL=vim
47 export EDITOR=vim
49 export DEBEMAIL=meillo@marmaro.de
50 export DEBFULLNAME="markus schnalke"
54 # functions
56 function ls {
57 command ls -F --color=auto "$@"
58 }
59 function ll {
60 ls -l "$@"
61 }
62 function lh {
63 ls -lh "$@"
64 }
65 function la {
66 ls -A "$@"
67 }
68 function lt {
69 ls -lhtr "$@"
70 }
72 function dh {
73 df -h "$@"
74 }
76 function cal {
77 command cal -m "$@"
78 }
79 function xpdf {
80 command xpdf -z page "$@" &
81 }
83 function dusch {
84 du -sch *
85 }
86 function du1 {
87 if [ "$*" = "" ] ; then
88 du -h --max-depth=1 --exclude=".?*" "`pwd`"
89 else
90 du -h --max-depth=1 --exclude=".?*" "$@"
91 fi
92 }
93 function du2 {
94 if [ "$*" = "" ] ; then
95 du -h --max-depth=2 --exclude=".?*" "`pwd`"
96 else
97 du -h --max-depth=2 --exclude=".?*" "$@"
98 fi
99 }
101 function psgrep {
102 ps -eaf | grep --color=auto -i "$1"
103 }
105 function returncode {
106 returncode=$?
107 if [ $returncode -ne 0 ] ; then
108 echo "$returncode"
109 fi
110 }
112 # aliases
114 #alias fireworks='wine /usr/share/Fireworks4/Fireworks\ 4.exe'
115 #alias stendhal='java -jar /home/meillo/Spiele/Stendhal/stendhal'
119 # If this is an xterm set the title to user@host:dir
120 case "$TERM" in
121 xterm*|rxvt*)
122 PROMPT_COMMAND=$PROMPT_COMMAND' ; echo -ne "\033]0;${HOSTNAME} | ${USER}\007"'
123 ;;
124 *)
125 ;;
126 esac
129 # command prompt
130 PS1='\033[01;31m$(returncode)\033[00m\n\033[01;31m<\033[00m \h \033[01;31m|\033[00m \u \033[01;31m|\033[00m \w \033[01;31m>\033[00m\n \$ '