From 4df23bbe78ea60c020aebab4d5be3ca4d41e58f5 Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Fri, 29 Nov 2024 14:57:23 +0100 Subject: [PATCH] Add work laptop configuration --- m1.epfl.ch.bash_aliases | 7 +++++++ m1.epfl.ch.profile | 12 ++++++++++++ m1.epfl.ch.zshrc | 4 ++++ 3 files changed, 23 insertions(+) create mode 100644 m1.epfl.ch.bash_aliases create mode 100644 m1.epfl.ch.profile create mode 100644 m1.epfl.ch.zshrc diff --git a/m1.epfl.ch.bash_aliases b/m1.epfl.ch.bash_aliases new file mode 100644 index 0000000..92194cd --- /dev/null +++ b/m1.epfl.ch.bash_aliases @@ -0,0 +1,7 @@ +alias dcb='devcontainer build --workspace-folder $(git rev-parse --show-toplevel)' +alias dce='devcontainer exec --workspace-folder $(git rev-parse --show-toplevel)' +alias dcu='devcontainer up --workspace-folder $(git rev-parse --show-toplevel)' + +if /usr/bin/which -s pyenv; then + alias brew='env PATH="${PATH//$(pyenv root)\/shims:/}" brew' +fi diff --git a/m1.epfl.ch.profile b/m1.epfl.ch.profile new file mode 100644 index 0000000..039a351 --- /dev/null +++ b/m1.epfl.ch.profile @@ -0,0 +1,12 @@ +# pyenv support +export PYENV_ROOT="${HOME}/.pyenv" +[[ -d ${PYENV_ROOT}/bin ]] && export PATH="${PYENV_ROOT}/bin:${PATH}" +eval "$(pyenv init -)" + +# pyenv-virtualenv +eval "$(pyenv virtualenv-init -)" + +# Setting PATH for Python 3.12 +# The original version is saved in .zprofile.pysave +PATH="/Library/Frameworks/Python.framework/Versions/3.12/bin:${PATH}" +export PATH diff --git a/m1.epfl.ch.zshrc b/m1.epfl.ch.zshrc new file mode 100644 index 0000000..2cd65bd --- /dev/null +++ b/m1.epfl.ch.zshrc @@ -0,0 +1,4 @@ +# Add ~/bin +if [ -e "${HOME}/.local/bin" ]; then + PATH="${HOME}/.local/bin:${PATH}" +fi