antidote + cleanup

This commit is contained in:
daniel
2023-03-18 12:00:27 +01:00
parent fd65585022
commit ea11291a56
13 changed files with 1745 additions and 1400 deletions

View File

@@ -1,53 +1,36 @@
#!/bin/bash
# Make ZSH the default shell environment
if [ `cat /etc/passwd | grep $USER | awk -F ':' '{print $7}'` != "/usr/bin/zsh" ]; then
echo "Changing shell to zsh"
chsh -s $(which zsh)
fi
# zgen Installation
if [ ! -d "$HOME/.zgen" ]; then
echo "Installing zgen"
git clone --depth=1 https://github.com/tarjoilija/zgen.git "${HOME}/.zgen"
if ! type zsh > /dev/null; then
echo "Cannnot change default shell to zsh: not installed"
else
echo "zgen already exists."
# Make ZSH the default shell environment
if [ $(cat /etc/passwd | grep $USER | awk -F ':' '{print substr($7, length($7)-3)}') != "/zsh" ]; then
echo "Changing shell to zsh"
chsh -s $(which zsh)
fi
# Antidote Installation
if [ ! -d "$HOME/.antidote" ]; then
echo "Installing antidote"
# make sure git is installed
if ! type git > /dev/null; then
echo "Git not installed. Cannot install antidote"
else
git clone --depth=1 https://github.com/mattmc3/antidote.git $HOME/.antidote
fi
else
echo "antidote already exists."
fi
fi
# Conda and pip
if [ ! -d "$HOME/conda" ]; then
echo "Installing Conda"
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh
bash /tmp/miniconda.sh -b -p ~/conda
rm /tmp/miniconda.sh
echo "yes" | conda install pip
else
echo "Conda already installed"
fi
# Marker
if [ ! -d "$HOME/.marker" ]; then
echo "Installing Marker"
git clone --depth=1 https://github.com/pindexis/marker $HOME/.marker
$HOME/.marker/install.py
fi
# fasd
if [ ! -d "$HOME/bin" ]; then
mkdir -p $HOME/bin
fi
if [ ! -f "$HOME/bin/fasd" ]; then
echo "Installing fasd"
wget https://raw.githubusercontent.com/clvv/fasd/master/fasd
mv fasd $HOME/bin/fasd
chmod +x $HOME/bin/fasd
fi
# vundle
if [ ! -d "$HOME/.vim/bundle" ]; then
echo "setup vundle"
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
fi
# linking dotfiles
$HOME/.dotfiles/dotfiles.sh link base

View File

@@ -1,38 +1,3 @@
# aliases
if [ -f .cargo/bin/bat ]; then
alias cat='bat'
fi
alias clip='xsel --clipboard'
alias groclean='rm \#*'
alias latexclean='for i in `*aux *bbl *blg *fdb_latexmk *fls *lof *log *lot *out *synctex.gz *toc`; do rm $i; done'
alias ls='ls --color=auto -lh'
alias workon='source activate' # enable anaconda environ
alias cwl="cwl-runner"
function gitignore() {
for i in "$@"; do
echo $i >> .gitignore
done
}
# lhr
alias squeue="ssh lcluster17 squeue"
alias csum="ssh lcluster17 csum"
alias csreport="ssh lcluster17 csreport"
alias scancel="ssh lcluster17 scancel"
# snakemake use all cores by default
sm() {
if [[ "$*" == *"-j"* || "$*" == *"--jobs"* || "$*" == *"--cores"* ]]; then
snakemake $@
else
snakemake -j all $@
fi
}
# extract whatever archive
alias extract="dtrx"
# faster sshfs
#alias sshfs="sshfs -o Ciphers=arcfour,Compression=no,auto_cache"
#alias sshfs="sshfs -o Compression=no,auto_cache"

View File

@@ -1,27 +0,0 @@
antigen use oh-my-zsh
# bundles
#antigen bundle git
#antigen bundle zsh-users/zsh-completions
#antigen bundle pip
#antigen bundle zsh-users/zsh-syntax-highlighting
#antigen bundle zsh-users/zsh-history-substring-search
antigen bundle command-not-found
# theme
export TERM="xterm-256color"
DEFAULT_USER=bauer
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(ssh context dir vcs anaconda)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(background_jobs status time)
# Anaconda
POWERLEVEL9K_ANACONDA_RIGHT_DELIMITER='>'
POWERLEVEL9K_ANACONDA_LEFT_DELIMITER='<'
POWERLEVEL9K_ANACONDA_BACKGROUND='24'
POWERLEVEL9K_ANACONDA_FOREGROUND='111'
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
antigen theme bhilburn/powerlevel9k powerlevel9k
#antigen apply

View File

@@ -1,5 +0,0 @@
channels:
- conda-forge
- salilab
- defaults
channel_priority: strict

View File

@@ -1,19 +1,21 @@
#!/bin/bash
# system preferences
export TERM="xterm-256color"
export LANG=en_US.UTF-8
export SSH_KEY_PATH="~/.ssh/rsa_id"
# Prefered programs
export EDITOR='vim'
export TERMINAL="terminator"
export BROWSER="firefox"
export PAGER='most'
export BAT_PAGER='less'
if type most > /dev/null; then
export PAGER='most'
else
export PAGER='less'
fi
# Path
export PATH="${PATH}:$HOME/.cargo/bin"
export PATH="${PATH}:$HOME/bin" # binaries
export PATH="${PATH}:$HOME/scripts" # scripts
export PATH="${PATH}:$HOME/.local/bin" # python executeables
export PATH="${PATH}:$HOME/bin/pushbullet-bash"
# Change Path
export PATH="${PATH}:$HOME/.local/bin"
if [ -d $HOME/.cargo ]; then
export PATH="${PATH}:$HOME/.cargo/bin"
fi

View File

@@ -9,6 +9,7 @@
tool = kdiff3
[core]
pager = diff-so-fancy | less --tabs=4 -RFX
autocrlf = input
[alias]
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
cm = !git add -A && git commit -m

View File

@@ -1,5 +0,0 @@
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=ON -DCMAKE_INSTALL_PREFIX=/opt/gromacs-2019.1/ -DCMAKE_C_COMPILER=/usr/bin/gcc-4.9 -DCMAKE_CXX_COMPILER=/usr/bin/g++-4.9##gmx_compile
git clone git@git.compbiol.bio.tu-darmstadt.de:Daniel/md-template.git sim##md-template
git clone git@git.compbiol.bio.tu-darmstadt.de:Daniel/build_system.git {{folder}} && cd {{folder}}##build_system
cookiecutter git@git.compbiol.bio.tu-darmstadt.de:Daniel/cookiecutter-md-template.git##cookiecutter-md-template
cookiecutter git@git.compbiol.bio.tu-darmstadt.de:Daniel/cookiecutter-mpt.git##cookiecutter MPT

1671
profiles/base/.p10k.zsh Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,46 +0,0 @@
#!/usr/bin/zsh
export TERM="xterm-256color"
zmodules=(ssh directory environment git history input utility custom \
syntax-highlighting history-substring-search prompt completion fasd autosuggestions)
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
DEFAULT_USER=bauer
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(ssh context dir vcs anaconda)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(background_jobs status time)
# Anaconda
POWERLEVEL9K_ANACONDA_RIGHT_DELIMITER='>'
POWERLEVEL9K_ANACONDA_LEFT_DELIMITER='<'
POWERLEVEL9K_ANACONDA_BACKGROUND='24'
POWERLEVEL9K_ANACONDA_FOREGROUND='111'
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
source "${HOME}/.zgen/zgen.zsh"
if ! zgen saved; then
echo "generating zgen save"
zgen oh-my-zsh
zgen oh-my-zsh plugins/git
zgen oh-my-zsh plugins/sudo
zgen oh-my-zsh plugins/command-not-found
zgen oh-my-zsh plugins/git
zgen oh-my-zsh plugins/debian
zgen oh-my-zsh plugins/tmux
zgen oh-my-zsh plugins/vundle
zgen oh-my-zsh plugins/ssh-agent
zgen oh-my-zsh plugins/copydir
zgen load zsh-users/zsh-syntax-highlighting.git
zgen load zsh-users/zsh-history-substring-search.git
zgen load tarruda/zsh-autosuggestions.git
zgen load bhilburn/powerlevel9k powerlevel9k
zgen save
fi

View File

@@ -0,0 +1,14 @@
rupa/z # jump into most used directories
belak/zsh-utils path:history # enable history
belak/zsh-utils path:editor # allow vim bindings
# completions and suggestions
zsh-users/zsh-history-substring-search
zsh-users/zsh-completions # additionally completions
zsh-users/zsh-autosuggestions
#ZSH_AUTOSUGGEST_STRATEGY=(history completion)
# theme
romkatv/powerlevel10k

View File

@@ -1,45 +1,35 @@
source "${HOME}/.zgenrc"
# source other dotfiles
source $HOME/.environment
if [ -f "$HOME/.environment.local" ]; then
source $HOME/.environment.local
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/bauer/conda/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/bauer/conda/etc/profile.d/conda.sh" ]; then
. "/home/bauer/conda/etc/profile.d/conda.sh"
else
export PATH="/home/bauer/conda/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
source $HOME/.aliases
# config specific to this machine
if [ -f $HOME/.zshrc_local ]; then
source $HOME/.zshrc_local
fi
if [ -n "$GMXRC" ]; then
source $GMXRC
ENV_FILE="$HOME/.environment"
LOCAL_ENV_FILE="$HOME/.environment.local"
ALIAS_FILE="$HOME/.aliases"
LOCAL_ALIAS_FILE="$HOME/.aliases.local"
source $ENV_FILE
if [ -f $LOCAL_ENV_FILE ]; then
source $LOCAL_ENV_FILE
fi
source $ALIAS_FILE
if [ -f $LOCAL_ALIAS_FILE ]; then
source $LOCAL_ALIAS_FILE
fi
# fasd autocompletion
eval "$(fasd --init auto)"
# marker
[[ -s "$HOME/.local/share/marker/marker.sh" ]] && source "$HOME/.local/share/marker/marker.sh"
source $HOME/.antidote/antidote.zsh
antidote load
# snakemake autocomplete
#if hash snakemake 2>/dev/null; then
# compdef _gnu_generic snakemake
#fi
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
export PATH="$HOME/.poetry/bin:$PATH"
# vim mode
bindkey -v

File diff suppressed because it is too large Load Diff

View File

@@ -1,33 +0,0 @@
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
# Modified from https://gist.github.com/m14t/3056747 to work on http/https and .git/nothing repos
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https*://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi
USER=`echo $REPO_URL | sed -Ene's#https*://github.com/([^/]*)/(.*)(\.git)?#\1#p'`
if [ -z "$USER" ]; then
echo "-- ERROR: Could not identify User."
exit
fi
REPO=`echo $REPO_URL | sed -Ene's#https*://github.com/([^/]*)/(.*)(\.git)?#\2#p'`
if [ -z "$REPO" ]; then
echo "-- ERROR: Could not identify Repo."
exit
fi
NEW_URL="git@github.com:$USER/$REPO.git"
echo "Changing repo url from "
echo " '$REPO_URL'"
echo " to "
echo " '$NEW_URL'"
echo ""
CHANGE_CMD="git remote set-url origin $NEW_URL"
`$CHANGE_CMD`
echo "Success"