]> git.donarmstrong.com Git - home-base.git/blob - .bashrc
63ffd49d3873befe7de5566bc0b263382e604411
[home-base.git] / .bashrc
1 # ~/.bashrc: executed by bash(1) for non-login shells.
2 # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
3 # for examples
4
5 # If running interactively, then:
6 if [ "$PS1" ]; then
7
8     # don't put duplicate lines in the history. See bash(1) for more options
9     export HISTCONTROL=ignoredups
10     if [ -x ~/bin/sane_editor ]; then
11         EDITOR=~/bin/sane_editor;
12     elif [ -x /usr/bin/jed ]; then
13         EDITOR="/usr/bin/jed";
14     elif [ -x /usr/bin/vi ]; then
15         EDITOR="/usr/bin/vi";
16     fi;
17
18     if [ -n "$EDITOR" ]; then
19         export EDITOR;
20     fi;
21     # bts debian options
22
23     export DEBEMAIL="don@debian.org"
24
25     # enable color support of ls and also add handy aliases
26     eval `dircolors -b`
27     alias ls='ls --color=auto'
28     alias gr='gimp-remote-2.2'
29     alias emc='sane_editor'
30
31     # set a fancy prompt
32     PS1="\[\033[0;36m\]\h \t \w$\[\033[0m\] "
33     # \[\033[1;36m\][\w]\n\[\033[0;36m\][\h|\t]$ \[\033[0m\]
34
35     # If this is an xterm set the title to user@host:dir
36     case $TERM in
37         screen|xterm*)
38             PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
39             ;;
40         *)
41             ;;
42     esac
43
44     # enable programmable completion features (you don't need to enable
45     # this, if it's already enabled in /etc/bash.bashrc).
46     if [ -f /etc/bash_completion ]; then
47       . /etc/bash_completion;
48     fi;
49
50     # set up ssh-agent
51     if which ssh-agent >/dev/null && [ -d ~/.ssh ]; then
52         if [ -e ~/.ssh/ssh_agent_info ] && \
53             kill -0 "$(awk -F '[=;]' '/^SSH_AGENT_PID/{print $2}' ~/.ssh/ssh_agent_info)"; then
54             . ~/.ssh/ssh_agent_info > /dev/null
55         else
56             ssh-agent -s > ~/.ssh/ssh_agent_info
57             . ~/.ssh/ssh_agent_info > /dev/null
58         fi;
59     fi;
60     
61     alias aumix2='aumix -d /dev/mixer1 -I'
62     if locale -a |grep -qi en_US.utf8; then
63         LANG="en_US.UTF-8"
64     else
65         LANG=C
66     fi;
67     export LANG
68     export PATH="~/bin:$PATH"
69     if [ ! -e ~/tmp ]; then
70         mkdir ~/tmp;
71     fi;
72     export TMPDIR="$(echo ~/tmp)";
73
74     if [ -n "$(which devtodo)" ]; then
75         for a in tda tdd tde; do
76             alias "s${a}"="STODO_NO_COMMIT=1 $a"
77         done;
78
79         TODO_OPTIONS="--timeout --summary"
80
81         cd ()
82         {
83             builtin cd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS}
84         }
85
86         pushd ()
87         {
88             builtin pushd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS}
89         }
90         
91         popd ()
92         {
93             builtin popd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS}
94         }              
95         
96         # Run todo initially upon login
97         devtodo ${TODO_OPTIONS}
98     fi;
99 fi