diff --git a/bashrc b/bashrc index fdcdd93..f0d7fff 100755 --- a/bashrc +++ b/bashrc @@ -139,6 +139,8 @@ alias mpg123="mpg123 -C -v --title" export PLAYER="mpg123 -C -v --title" alias screen="screen -e^z^z" alias zcd="cd \`zenity --file-selection --directory\`" +alias gtags="gtags -v" +alias htags="htags -ansx" alias pad=notepad null type gedit && alias pad=gedit @@ -268,7 +270,7 @@ dh(){ then dirs -v -l else - local dir="$(dirs -v -l | \grep "^ *$1 \+" | sed "s/^ *[0-9]\+ *//g")" + local dir="$(dirs -v -l | \grep "^ *$1 \+" | sed "s/^ *[0-9]* *//g")" cd "$dir" fi } @@ -548,8 +550,8 @@ __my_battery_status(){ alias bat='__my_battery_status %s\\n' ip-address(){ - test type ifconfig >/dev/null 2>&1 || return 1 - local ip=$(LANG=C ifconfig | \grep --color=never "inet " | \grep --color=never -v "127.0.0.1" | awk '{print $2}') + type ip >/dev/null 2>&1 || return 1 + local ip=$(LANG=C ip addr show scope global | \grep --color=never --only-matching 'inet [^ ]*' | cut -d " " -f 2) test -n "$ip" && printf $1 $ip } @@ -570,7 +572,11 @@ __my_ps1_moc(){ __my_moc_state "[MOC:%s]" return $last } -test -r /usr/share/git/git-prompt.sh && . /usr/share/git/git-prompt.sh +for f in /usr/share/git/git-prompt.sh \ + /opt/local/share/doc/git-core/contrib/completion/git-prompt.sh +do + test -r $f && . $f && break +done GIT_PS1_SHOWDIRTYSTATE=t GIT_PS1_SHOWUPSTREAM=t __my_ps1_git(){ @@ -630,7 +636,7 @@ __my_set_title(){ ;; esac } -export PROMPT_COMMAND="__my_set_title \${USER}@\${HOSTNAME}\ \${PWD}" +PROMPT_COMMAND="__my_set_title \${USER}@\${HOSTNAME}\ \${PWD}" # copied from https://wiki.archlinux.org/index.php/X_resources invader(){ diff --git a/gitignore b/gitignore index bcf74c8..9aa7e52 100644 --- a/gitignore +++ b/gitignore @@ -1,6 +1,7 @@ \#* *~ .DS_Store +__pycache__/ # gnu global GPATH diff --git a/profile b/profile index f828c76..066dd31 100755 --- a/profile +++ b/profile @@ -8,6 +8,7 @@ export TERMCAP="${TERMCAP}:vb=" export HOSTNAME export ENV=~/.shrc export PYTHONDOCS=/usr/share/doc/python/html/ +export PYTHONPATH="${PYTHONPATH}:${HOME}/my/bin/py" test -f "${HOME}/.pythonrc" && export PYTHONSTARTUP="${HOME}/.pythonrc" #export PYTHONPATH="~/.local/share/lib/python3.2/site-packages" diff --git a/tmux.conf b/tmux.conf index 90c10d7..1f4dfdf 100644 --- a/tmux.conf +++ b/tmux.conf @@ -6,6 +6,7 @@ bind-key C-z send-prefix bind-key C command-prompt "new-window '%%'" setw -g mode-keys vi +set -g base-index 1 set -g default-command /bin/bash #set -g default-terminal screen-256color