diff --git a/zsh/.gitignore b/zsh/.gitignore new file mode 100644 index 0000000..57238b6 --- /dev/null +++ b/zsh/.gitignore @@ -0,0 +1,2 @@ +.*_config* +!.*_config*.example diff --git a/zsh/.gitmodules b/zsh/.gitmodules new file mode 100644 index 0000000..4c2a7aa --- /dev/null +++ b/zsh/.gitmodules @@ -0,0 +1,3 @@ +[submodule "antigen"] + path = antigen + url = https://github.com/zsh-users/antigen.git diff --git a/zsh/.powerline_config_arch.example b/zsh/.powerline_config_arch.example new file mode 100644 index 0000000..61f0487 --- /dev/null +++ b/zsh/.powerline_config_arch.example @@ -0,0 +1 @@ +source /usr/lib/python3.5/site-packages/powerline/bindings/zsh/powerline.zsh diff --git a/zsh/.powerline_config_debian.example b/zsh/.powerline_config_debian.example new file mode 100644 index 0000000..7022327 --- /dev/null +++ b/zsh/.powerline_config_debian.example @@ -0,0 +1 @@ +source /usr/local/lib/python2.7/dist-packages/powerline/bindings/zsh/powerline.zsh diff --git a/zsh/.user_config.example b/zsh/.user_config.example new file mode 100644 index 0000000..f774e9a --- /dev/null +++ b/zsh/.user_config.example @@ -0,0 +1 @@ +DEFAULT_USER=fabian diff --git a/zsh/.virtual_env_config.zsh.arch.example b/zsh/.virtual_env_config.zsh.arch.example new file mode 100644 index 0000000..71bfe32 --- /dev/null +++ b/zsh/.virtual_env_config.zsh.arch.example @@ -0,0 +1,16 @@ +export WORKON_HOME=~/python-envs +mkdir -p $WORKON_HOME + +function workon() { + if ! { [ "$TERM" = "screen" ] && [ -n "$TMUX" ]; } then + if ! { [ -z "$1" ] } then + tmux setenv VIRTUAL_ENV "$1" + fi + source /usr/bin/virtualenvwrapper.sh + workon "$@" + fi +} + +if [ -n "$VIRTUAL_ENV" ]; then + workon $VIRTUAL_ENV +fi diff --git a/zsh/.virtual_env_config.zsh.debian.example b/zsh/.virtual_env_config.zsh.debian.example new file mode 100644 index 0000000..a00dabc --- /dev/null +++ b/zsh/.virtual_env_config.zsh.debian.example @@ -0,0 +1,17 @@ +export WORKON_HOME=~/python-envs +mkdir -p $WORKON_HOME +source /usr/share/virtualenvwrapper/virtualenvwrapper.sh + +function workon() { + if ! { [ "$TERM" = "screen" ] && [ -n "$TMUX" ]; } then + if ! { [ -z "$1" ] } then + tmux setenv VIRTUAL_ENV "$1" + fi + source /usr/share/virtualenvwrapper/virtualenvwrapper.sh + workon "$@" + fi +} + +if [ -n "$VIRTUAL_ENV" ]; then + workon $VIRTUAL_ENV +fi diff --git a/zsh/.zshrc b/zsh/.zshrc new file mode 100644 index 0000000..b471a30 --- /dev/null +++ b/zsh/.zshrc @@ -0,0 +1,41 @@ +[[ -f ~/.zsh/.powerline_config ]] && source ~/.zsh/.powerline_config +[[ -f ~/.zsh/.user_config ]] && source ~/.zsh/.user_config +[[ -f ~/.zsh/.virtual_env_config.zsh ]] && source ~/.zsh/.virtual_env_config.zsh +[[ -f /usr/share/doc/find-the-command/ftc.zsh ]] && source /usr/share/doc/find-the-command/ftc.zsh +# Load Antigen +source ~/.zsh/antigen/antigen.zsh + +# Clear screen by ctrl+q +bindkey '^q' clear-screen + +# Load various lib files +antigen use oh-my-zsh + +# +# Antigen Theme +# + +antigen theme agnoster + +# +# Antigen Bundles +# + +antigen bundle git +antigen bundle heroku +antigen bundle command-not-found +antigen bundle go + +# antigen bundle tmuxinator +antigen bundle zsh-users/zsh-syntax-highlighting + +# For SSH, starting ssh-agent is annoying +antigen bundle ssh-agent + +# Python Plugins +antigen bundle pip +antigen bundle python +antigen bundle virtualenv + +antigen apply +export EDITOR='vim' diff --git a/zsh/antigen b/zsh/antigen new file mode 160000 index 0000000..1359b99 --- /dev/null +++ b/zsh/antigen @@ -0,0 +1 @@ +Subproject commit 1359b9966689e5afb666c2c31f5ca177006ce710