X-Git-Url: https://git.donarmstrong.com/?p=home-base.git;a=blobdiff_plain;f=.bashrc;h=e0af9c23564be586bad131236caf407f8d2a016d;hp=6222be40d9857afeb3b1d9547ac5ec7ff277568e;hb=00e1ec9e64437e58956bf93271ca9e05fcb7698d;hpb=9d3bfef8e863af457b10bdd91e0e58bef20dae71 diff --git a/.bashrc b/.bashrc index 6222be4..e0af9c2 100644 --- a/.bashrc +++ b/.bashrc @@ -28,46 +28,84 @@ if [ "$PS1" ]; then alias gr='gimp-remote-2.2' alias emc='sane_editor' + alias svn-b="svn-buildpackage --svn-builder 'pdebuild --buildresult ..' --svn-ignore-new" + # set a fancy prompt - PS1='\u@\h:\w\$ ' + #printf '\33]2;%s\007' + PS1="\[\033[0;36m\]\h \t \w$\[\033[0m\] " + # \[\033[1;36m\][\w]\n\[\033[0;36m\][\h|\t]$ \[\033[0m\] # If this is an xterm set the title to user@host:dir - #case $TERM in - #xterm*) - # PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' - # ;; - #*) - # ;; - #esac + case $TERM in + screen|xterm*) + PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' + ;; + rxvt*) + PROMPT_COMMAND='echo -ne "\033]2;${USER}@${HOSTNAME}: ${PWD}\007"' + ;; + + *) + ;; + esac # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc). if [ -f /etc/bash_completion ]; then . /etc/bash_completion; fi; + + # set up ssh-agent + if which ssh-agent >/dev/null && [ -d ~/.ssh ]; then +# for + if [ -e ~/.ssh/ssh_agent_info ] && \ + [ -n "$(awk -F '[=;]' '/^SSH_AGENT_PID/{print $2}' ~/.ssh/ssh_agent_info)" ] && \ + kill -0 "$(awk -F '[=;]' '/^SSH_AGENT_PID/{print $2}' ~/.ssh/ssh_agent_info)" >/dev/null 2>&1; then + . ~/.ssh/ssh_agent_info > /dev/null + elif [ -e ~/.ssh/ssh_agent_info_$(hostname) ] && \ + kill -0 "$(awk -F '[=;]' '/^SSH_AGENT_PID/{print $2}' ~/.ssh/ssh_agent_info_$(hostname))" >/dev/null 2>&1; then + . ~/.ssh/ssh_agent_info_$(hostname) > /dev/null + else + ssh-agent -s > ~/.ssh/ssh_agent_info_$(hostname) + . ~/.ssh/ssh_agent_info_$(hostname) > /dev/null + fi; + fi; alias aumix2='aumix -d /dev/mixer1 -I' - export LANG="en_US.UTF-8" + if locale -a |grep -qi en_US.utf8; then + LANG="en_US.UTF-8" + else + LANG=C + fi; + export LANG export PATH="~/bin:$PATH" + if [ ! -e ~/tmp ]; then + mkdir ~/tmp; + fi; + export TMPDIR="$(echo ~/tmp)"; - TODO_OPTIONS="--timeout --summary" + if [ -n "$(which devtodo)" ]; then + for a in tda tdd tde; do + alias "s${a}"="STODO_NO_COMMIT=1 $a" + done; - cd () - { - builtin cd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS} - } + TODO_OPTIONS="--timeout --summary" - pushd () - { - builtin pushd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS} - } - - popd () - { - builtin popd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS} - } - - # Run todo initially upon login - devtodo ${TODO_OPTIONS} + cd () + { + builtin cd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS} + } + pushd () + { + builtin pushd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS} + } + + popd () + { + builtin popd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS} + } + + # Run todo initially upon login + devtodo ${TODO_OPTIONS} + fi; fi