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