dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 029835b4adcad23a19cecf6c984bb2cf685038db
parent 0ff56f46fffe6a8a13b4af0aea1f7f27aae8155d
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Thu,  2 Jun 2022 23:09:39 +0200

shell: configs for pyenv

Diffstat:
Mshell/env | 10++++++++++
Mshell/paths | 2++
Mshell/rc | 4----
3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/shell/env b/shell/env @@ -28,6 +28,13 @@ if command -v brave >/dev/null 2>&1; then else export BROWSER="open" fi + +if [ -f /usr/local/bin/virtualenvwrapper.sh ]; then + export WORKON_HOME=$HOME/.config/virtualenvs + VIRTUALENVWRAPPER_PYTHON=$(which python3); export VIRTUALENVWRAPPER_PYTHON + export VIRTUALENVWRAPPER_SCRIPT=/usr/local/bin/virtualenvwrapper.sh +fi + export WWW_HOME="https://tab.alex.balgavy.eu" # Icons for lf {{{1 export LF_ICONS="\ @@ -225,3 +232,6 @@ eval "$(perl -I$XDG_DATA_HOME/perl5/lib/perl5 -Mlocal::lib=$XDG_DATA_HOME/perl5) alias glow='glow --config "$XDG_CONFIG_HOME/glow/glow.yml"' export RUSTUP_HOME="$XDG_DATA_HOME/rustup" export CARGO_HOME="$XDG_DATA_HOME/cargo" +export PYENV_ROOT="$XDG_DATA_HOME/pyenv" +export RBENV_ROOT="$XDG_DATA_HOME/rbenv" + diff --git a/shell/paths b/shell/paths @@ -24,6 +24,8 @@ [ -d "$XDG_DATA_HOME/cargo/bin" ] && [ -n "${PATH##*"$XDG_DATA_HOME/cargo/bin"*}" ] && PATH="$XDG_DATA_HOME/cargo/bin:$PATH" [ -d "/usr/local/go/bin" ] || [ -L "/usr/local/go/bin" ] && [ -n "${PATH##*"/usr/local/go/bin"*}" ] && PATH="/usr/local/go/bin:$PATH" [ -d "/usr/local/opt/ruby/bin" ] || [ -L "/usr/local/opt/ruby/bin" ] && [ -n "${PATH##*"/usr/local/opt/ruby/bin"*}" ] && PATH="/usr/local/opt/ruby/bin:$PATH" +[ -d "$PYENV_ROOT/bin" ] && [ -n "${PATH##*"$PYENV_ROOT/bin"*}" ] && PATH="$PYENV_ROOT/bin:$PATH" command -v rbenv 1>/dev/null 2>&1 && eval "$(rbenv init -)" command -v jenv 1>/dev/null 2>&1 && eval "$(jenv init -)" +command -v pyenv >/dev/null 2>&1 && eval "$(pyenv init -)" export PATH diff --git a/shell/rc b/shell/rc @@ -9,10 +9,6 @@ source_if_exists() { [ -f "$1" ] && . "$1"; } # Enable virtualenvwrapper if installed if [ -f /usr/local/bin/virtualenvwrapper.sh ]; then - export WORKON_HOME=$HOME/.config/virtualenvs - VIRTUALENVWRAPPER_PYTHON=$(which python3); export VIRTUALENVWRAPPER_PYTHON - export VIRTUALENVWRAPPER_SCRIPT=/usr/local/bin/virtualenvwrapper.sh - mkdir -p "$WORKON_HOME" . /usr/local/bin/virtualenvwrapper_lazy.sh fi