diff --git a/.zshrc b/.zshrc index e6be33b..dc59bc1 100644 --- a/.zshrc +++ b/.zshrc @@ -1,20 +1,23 @@ -if [ -f /usr/local/lib/python2.7/dist-packages/powerline/bindings/zsh/powerline.zsh ]; -then - source /usr/local/lib/python2.7/dist-packages/powerline/bindings/zsh/powerline.zsh +if [ -f `which powerline-daemon` ]; then + powerline-daemon -q + POWERLINE_BASH_CONTINUATION=1 + POWERLINE_BASH_SELECT=1 + . /usr/local/lib/python2.7/dist-packages/powerline/bindings/zsh/powerline.zsh fi - -# -# User configuration sourced by interactive shells -# +# gromacs needs to be before ZIM for autocompletion +if [ -z "$GMXRC" ]; then + GMXRC="/opt/gromacs-2018/bin/GMXRC" +fi +source $GMXRC # Change default zim location export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim # Start zim -[[ -s ${ZIM_HOME}/init.zsh ]] && source ${ZIM_HOME}/init.zsh - +[[ -s ${ZIM_HOME}/init.zsh ]] && source ${ZIM_HOME}/init.zsh +# preferences export LANG=en_US.UTF-8 export EDITOR='vim' export SSH_KEY_PATH="~/.ssh/rsa_id" @@ -22,30 +25,28 @@ export TERMINAL="terminator" export BROWSER="firefox" export PAGER='most' -source ~/.zshrc_functions -if [ -f $HOME/.zshrc_local ]; -then -source $HOME/.zshrc_local -fi - # alter path export PATH="$HOME/.cargo/bin:$PATH" -export PATH="/opt/pymol:${PATH}" export PATH="$HOME/anaconda3/bin:${PATH}" # binaries export PATH="$HOME/bin:${PATH}" # binaries export PATH="$HOME/scripts:${PATH}" # scripts export PATH="$HOME/.local/bin:${PATH}" # python executeables +# aliases +alias clip='xsel --clipboard' +alias groclean='rm \#*' +alias sm='snakemake' +alias ls='ls -lh' +alias workon='source activate' # enable anaconda environ + +# config specific to this machine (not copied from dotfiles) +if [ -f $HOME/.zshrc_local ]; then + source $HOME/.zshrc_local +fi + # fasd autocompletion eval "$(fasd --init auto)" # marker [[ -s "$HOME/.local/share/marker/marker.sh" ]] && source "$HOME/.local/share/marker/marker.sh" -# clipboard -alias clip='xsel --clipboard' - -alias groclean='rm \#*' -alias sm='snakemake' -alias ls='ls -lh' -alias workon='source activate' # enable anaconda environ diff --git a/.zshrc_functions b/.zshrc_functions deleted file mode 100644 index 9282c2c..0000000 --- a/.zshrc_functions +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -# open a web browser on google for a query -function google { - function urlencode { - print "${${(j: :)@}//(#b)(?)/%$[[##16]##${match[1]}]}" - } - - xdg-open "https://www.google.com/search?q=`urlencode "${(j: :)@}"`" -} - -# open a web browser on google for a query -function google { - function urlencode { - print "${${(j: :)@}//(#b)(?)/%$[[##16]##${match[1]}]}" - } - - xdg-open "https://www.google.com/search?q=`urlencode "${(j: :)@}"`" -} - - -# alter keyboard layout -setKeyboard() { - setxkbmap -layout $1 -} - -# download pdb file to current dir -pdb() { - URL=http://www.rcsb.org/pdb/files/$1.pdb.gz - if [ -z "$2" ]; then - 2="./" - fi - - wget $URL -P $2 - gunzip $2/$1.pdb.gz -} - -