Required installed packages:
bat
: bettercat
delta
: betterdiff
exa
: betterls
fzf
: fuzzy finderzsh-z
: quick folder jumpergit
: version control :)nano
: I'm not a vim user, sorry :(zsh
: shelloh-my-zsh
: zsh configuration managerpowerlevel10k
: zsh themedistrobox
: containers manager (sorta, see #Distrobox)
Files that should be in dotfiles
folder:
.oh-my-zsh
: folder, oh-my-zsh installation folder.distroboxrc
: distrobox config file.gitconfig
: git config.p10k.zsh
: powerlevel10k config file.z
: zsh-z cache.zsh_history
: shell history.zshrc
: zsh config filedistrobox-init.sh
: script to setup newly created cloned distrobox containers (see #Distrobox)pyenv-init.sh
: script to create new python virtual environments (see #Python-venv)
All these files needs a symlink to home folder (~/
): ln -f -s /home/<USER>/<PATH_TO_DOTFILES>/<FILE> ~/
Aliases in .zshrc
(open the config for arguments):
ls
toexa
cat
tobat
diff
todelta
xdg-open
toopen
Useful shell shortcuts:
<CTRL-T>
: search file usingfzf
<CTRL-R>
: reverse history search<CTRL-S>
: forward history searchz <folder>
: navigate to folder skipping allcd
s (if already been there)
I try to keep my installations as clean as possible, so I use distrobox to separate development environments.
-
To create containers based on
fedora
ordebian
images, clone the two already set up distroboxes (with required packages installed):distrobox create -c [fedora | debian] -n <container_name>
Distrobox will take care of copying dotfiles and creating a custom separated home directory (thanks to .distroboxrc
config).
Python installation on the host machine is kept to the minimum, pip
is not even installed.
Each time dependencies are needed, a new virtual environment is created with pyenv-init.sh
script, aliased in .zshrc
to venv
.
All python environments are stored in ~/pyenvs
folder, and this path is used to configure editors and LSP (python.venvFolders
in VSCode), allowing it to be selected by jupyter notebooks.
A symlink to the current folder is then created.
-
To create a new python environment:
venv <env_name>
-
To activate the environment (from the folder containing the symlink):
source venv/bin/activate
-
To deactivate the environment:
deactivate