mirror of
https://github.com/dnlbauer/dotfiles.git
synced 2026-09-10 21:45:30 +00:00
zshrc
This commit is contained in:
100
.zshrc
100
.zshrc
@@ -4,105 +4,37 @@ if [[ -s ${ZDOTDIR:-${HOME}}/.zim/init.zsh ]]; then
|
|||||||
fi
|
fi
|
||||||
export PATH=$PATH:/
|
export PATH=$PATH:/
|
||||||
|
|
||||||
# user bin
|
# source my utility functions
|
||||||
export PATH="$HOME/bin:${PATH}"
|
source .zshrc_functions
|
||||||
|
|
||||||
# scripts
|
|
||||||
export PATH="$HOME/scripts:${PATH}"
|
|
||||||
|
|
||||||
# python binaries
|
# alter path
|
||||||
export PATH="$HOME/.local/bin:${PATH}"
|
export PATH="$HOME/bin:${PATH}" # binaries
|
||||||
|
export PATH="$HOME/scripts:${PATH}" # scripts
|
||||||
|
export PATH="$HOME/.local/bin:${PATH}" # python executeables
|
||||||
|
|
||||||
# enable fasd autocompletion
|
# fasd autocompletion
|
||||||
eval "$(fasd --init auto)"
|
eval "$(fasd --init auto)"
|
||||||
|
|
||||||
################# alias ###############################
|
# marker
|
||||||
|
[[ -s "$HOME/.local/share/marker/marker.sh" ]] && source "$HOME/.local/share/marker/marker.sh"
|
||||||
# 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: :)@}"`"
|
|
||||||
}
|
|
||||||
|
|
||||||
# separator
|
|
||||||
function hr {
|
|
||||||
print ${(l:COLUMNS::=:)}
|
|
||||||
}
|
|
||||||
|
|
||||||
alias groclean='rm \#*'
|
|
||||||
|
|
||||||
setKeyboard() {
|
|
||||||
setxkbmap -layout $1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
# the fuck?
|
||||||
eval $(thefuck --alias)
|
eval $(thefuck --alias)
|
||||||
# You can use whatever you want as an alias, like for Mondays:
|
|
||||||
eval $(thefuck --alias fu)
|
|
||||||
|
|
||||||
# Gromacs stuff
|
|
||||||
# ==================================================
|
|
||||||
swapgmx() {
|
|
||||||
if [ "$GMXBIN" = "/opt/gromacs-cuda/bin" ];
|
|
||||||
then
|
|
||||||
gmxsbm;
|
|
||||||
else
|
|
||||||
gmxcuda;
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
gmxsbm() {
|
|
||||||
echo "Sourcing GROMACS SBM"
|
|
||||||
source /opt/gromacs-sbm/bin/GMXRC
|
|
||||||
}
|
|
||||||
gmxcuda() {
|
|
||||||
echo "Sourcing GROMACS cuda"
|
|
||||||
source /opt/gromacs-cuda/bin/GMXRC
|
|
||||||
}
|
|
||||||
|
|
||||||
|
# gromacs
|
||||||
if [ -z "$GMXRC" ]; then
|
if [ -z "$GMXRC" ]; then
|
||||||
GMXRC="/opt/gromacs-cuda/bin/GMXRC"
|
GMXRC="/opt/gromacs-cuda/bin/GMXRC"
|
||||||
fi
|
fi
|
||||||
source $GMXRC
|
source $GMXRC
|
||||||
|
|
||||||
# =============================================
|
|
||||||
|
|
||||||
# ======= utility functions
|
# python
|
||||||
|
|
||||||
# supply id as
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
# =========================
|
|
||||||
|
|
||||||
# perl
|
|
||||||
PATH="/home/bauer/perl5/bin${PATH:+:${PATH}}"; export PATH;
|
|
||||||
PERL5LIB="/home/bauer/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
|
|
||||||
PERL_LOCAL_LIB_ROOT="/home/bauer/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
|
|
||||||
PERL_MB_OPT="--install_base \"/home/bauer/perl5\""; export PERL_MB_OPT;
|
|
||||||
PERL_MM_OPT="INSTALL_BASE=/home/bauer/perl5"; export PERL_MM_OPT;
|
|
||||||
|
|
||||||
# copernicus
|
|
||||||
export CPC_HOME=/opt/copernicus
|
|
||||||
export PATH=$PATH:$CPC_HOME
|
|
||||||
|
|
||||||
# cuda
|
|
||||||
export CUDA_HOME=/opt/cuda;
|
|
||||||
|
|
||||||
#PYTHONPATH="$HOME/scripts"
|
|
||||||
|
|
||||||
#modeller
|
|
||||||
PYTHONPATH="$PYTHONPATH:/opt/modeller/modlib:/opt/modeller/lib/x86_64-intel8/python3.3"
|
PYTHONPATH="$PYTHONPATH:/opt/modeller/modlib:/opt/modeller/lib/x86_64-intel8/python3.3"
|
||||||
export PYTHONPATH
|
export PYTHONPATH
|
||||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/modeller/lib/x86_64-intel8"
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/modeller/lib/x86_64-intel8"
|
||||||
|
|
||||||
export BROWSER=firefox
|
export CUDA_HOME=/opt/cuda;
|
||||||
|
export TERMINAL="terminator"
|
||||||
|
export BROWSER="firefox"
|
||||||
|
export EDITOR="vim"
|
||||||
|
|||||||
Reference in New Issue
Block a user