mirror of
https://codeberg.org/diginaut/dotfiles.git
synced 2026-02-04 15:50:26 +01:00
Compare commits
5 Commits
fe4c5bd146
...
ba6dbcd66c
| Author | SHA1 | Date | |
|---|---|---|---|
| ba6dbcd66c | |||
| cffb3bf714 | |||
| 55d4f43141 | |||
| fa2ff5074c | |||
| b2324c0e9c |
19
.config/direnv/direnvrc
Normal file
19
.config/direnv/direnvrc
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
layout_uv() {
|
||||||
|
if [[ -d ".venv" ]]; then
|
||||||
|
VIRTUAL_ENV="$(pwd)/.venv"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $VIRTUAL_ENV || ! -d $VIRTUAL_ENV ]]; then
|
||||||
|
log_status "No virtual environment exists. Executing \`uv venv\` to create one."
|
||||||
|
uv venv
|
||||||
|
VIRTUAL_ENV="$(pwd)/.venv"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d ".venv/bin" ]; then
|
||||||
|
PATH_add .venv/bin
|
||||||
|
elif [ -d ".venv/Scripts" ]; then
|
||||||
|
PATH_add .venv/Scripts
|
||||||
|
fi
|
||||||
|
export UV_ACTIVE=1 # or VENV_ACTIVE=1
|
||||||
|
export VIRTUAL_ENV
|
||||||
|
}
|
||||||
@@ -15,7 +15,8 @@ sh install.sh # follow the instructions and install the files in the homedir
|
|||||||
|
|
||||||
Extra's:
|
Extra's:
|
||||||
|
|
||||||
[virtualfish](https://virtualfish.readthedocs.io/en/latest/install.html) for virtualenv(wrapper) integration in `fish` shell.
|
- [virtualfish](https://virtualfish.readthedocs.io/en/latest/install.html) for virtualenv(wrapper) integration in `fish` shell.
|
||||||
|
- *N.B.:* virtualfish might be on its way out, with `uv` and `direnv` configurations
|
||||||
|
|
||||||
|
|
||||||
## Dependency on `fzf` and ripgrep `rg`
|
## Dependency on `fzf` and ripgrep `rg`
|
||||||
|
|||||||
@@ -62,8 +62,11 @@ DATETIME=$(date +%Y%m%d_%H%M)
|
|||||||
# Go home
|
# Go home
|
||||||
cd || exit
|
cd || exit
|
||||||
|
|
||||||
|
# We need this config (sub)dir to exist for the symlink
|
||||||
|
mkdir -p .config/direnv
|
||||||
|
|
||||||
# Symlink all the things
|
# Symlink all the things
|
||||||
for TARGET in .bash_aliases .bashrc bin .gitconfig .gitignore_global .gitmodules .hgauthors.txt .hgignore .hgrc .ideavimrc .ignore .screenrc .terminfo .tmux.conf .vim .vimrc install.sh
|
for TARGET in .bash_aliases .bashrc bin .gitconfig .gitignore_global .gitmodules .hgauthors.txt .hgignore .hgrc .ideavimrc .ignore .screenrc .terminfo .tmux.conf .vim .vimrc install.sh .config/direnv/direnvrc
|
||||||
do
|
do
|
||||||
make_link $DIR $TARGET
|
make_link $DIR $TARGET
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user