diff --git a/dotfiles/zsh/initializations.zsh b/dotfiles/zsh/initializations.zsh index 6ef54a9..ef96d44 100644 --- a/dotfiles/zsh/initializations.zsh +++ b/dotfiles/zsh/initializations.zsh @@ -1,2 +1,19 @@ #!/bin/zsh +if [[ "$OSTYPE" == linux-gnu* ]]; then + export PATH="/usr/local/bin:$PATH" + export PYENV_ROOT="$HOME/.pyenv" + + [[ -d "$PYENV_ROOT/bin" ]] && export PATH="$PYENV_ROOT/bin:$PATH" + + if command -v pyenv >/dev/null 2>&1; then + eval "$(pyenv init -)" + + if pyenv commands | grep -qx "virtualenv-init"; then + eval "$(pyenv virtualenv-init -)" + fi + fi +fi + +# RVM configuration +[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" diff --git a/dotfiles/zsh/keybinds.zsh b/dotfiles/zsh/keybinds.zsh index 39b1636..c75fa72 100644 --- a/dotfiles/zsh/keybinds.zsh +++ b/dotfiles/zsh/keybinds.zsh @@ -1,8 +1,3 @@ -# In here you can define various keybinds for any -# given setup. Just wrap them with the appropriate checks. - -# DEPRECATED: Use your operating system's keyboard config. -# Bind caps lock to escape if `setxkbmap` exists -#if type "setxkbmap" > /dev/null; then -# setxkbmap -option caps:escape -#fi +if command -v setxkbmap >/dev/null 2>&1 && [[ "$XDG_SESSION_TYPE" == "x11" ]]; then + setxkbmap -option caps:escape +fi