My configuration, with installation steps.
Theese dotfiles only work on Unix systems.
You need to have zsh installed!
Important: You need to have zsh installed!
Install using the install script:
zsh -c "$(curl -fsSL https://raw.githubusercontent.com/LucaAngioloni/.dotfiles/main/install.sh)"
This will install all the dependencies, tools and dotfiles.
Note: the script will ask for your password to install some dependencies.
Note: still experimental!
Use git to push and pull.
If the changes are on the existing files they should be applied immediately, otherwise if you add new "folders" or files, redo the Stow process.
Use the sup
command in the terminal to update the dotfiles and update all the dependencies and tools installed above.
On a Mac, install brew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install git
sudo apt-get install git
Install with this command:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Set ZSH as default shell
To select which theme to use change ZSH_THEME
in shell/.shellconfig/oh-my-zsh
.
You can just install the one you need.
My current favourite is: Powelevel10k
Clone this repo:
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
Clone this repo:
git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1
Symlink spaceship.zsh-theme
to your oh-my-zsh custom themes directory:
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
Install Starship:
# MacOS
brew install starship
# Debian
curl -sS https://starship.rs/install.sh | sh
# Run this command again to update
Install zsh-completions:
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
Install zsh-autosuggestions:
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Install fast-syntax-highlighting:
git clone https://github.com/zdharma-continuum/fast-syntax-highlighting.git \
${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting
Choose a theme with fast-theme {theme-name}
.
List all themes with fast-theme -l
.
Run fast-theme -t {theme-name}
option to obtain a snippet.
I use default
but I am not super happy with it.
brew install tmux
sudo apt-get install tmux
brew install ruby
sudo snap install ruby --classic
Requires ruby.
Install gem:
gem install colorls
brew install lsd
sudo apt-get install lsd
brew install thefuck
Requires Python.
pip3 install thefuck --user
brew install fd
sudo apt install fd-find
# If fd is not available in PATH (because it is called fdfind)
ln -s $(which fdfind) ~/.local/bin/fd
or refer to the documentation
brew install tree
sudo apt-get install tree
brew install bat
sudo apt-get install bat
# If bat is not available and it is instead batcat
mkdir -p ~/.local/bin
ln -s /usr/bin/batcat ~/.local/bin/bat
or refer to the documentation
brew install fzf
# To install useful key bindings and fuzzy completion (run once):
$(brew --prefix)/opt/fzf/install
$(brew --prefix)/opt/fzf/uninstall
brew uninstall fzf
sudo apt-get install fzf
Add ~/.fzf.zsh
with this:
# Auto-completion
# ---------------
source /usr/share/doc/fzf/examples/completion.zsh
# Key bindings
# ------------
source /usr/share/doc/fzf/examples/key-bindings.zsh
brew install direnv
brew uninstall direnv
sudo apt-get install direnv
brew install catimg
sudo apt-get install catimg
brew install ripgrep
sudo apt-get install ripgrep
brew install neovim
sudo snap install nvim --classic
git clone https://github.com/NvChad/NvChad ~/.config/nvim --depth 1 && nvim
brew install duf
sudo apt-get install duf
Install GNU stow.
sudo apt-get install stow
brew install stow
To install the dotfiles, first backup and remove all the dotfiles already there (otherwise stow will not work), then:
stow -R */
Use a NERD font. I use Fura Code
N.B. The font must be installed in the system and it is needed to show icons and advanced graphics.
On Mac use iTerm2. Themes and configurations are in the term
folder.
In iTerm2 go to Preferences and then General and click on Load preferences from a custom folder or URL and select the com.googlecode.iterm2.plist
file.
Installing git with brew instead of using the Apple git seems to speed things a little.
Also accepting the terms of the xcodebuild licence seems to help: sudo xcodebuild -license accept
.
To make startup faster set in the General tab of Profile in Command:
Command: /usr/local/bin/zsh -i
This should completely skip the login phase.
To make startup faster set in the General tab of Profile in Command:
Command: login -fq lucaangioloni /usr/local/bin/zsh -il
This serves 2 purposes:
- Start zsh in interactive and login mode with
-il
. - Do not show last login information with
-q
(same effect as.hushlogin
but it seems faster because it does not even go to search the logs to find the last login event. (? check this info)).
Install using brew bundle install
while in the root directory of this repo where the Brewfile
is.
brew bundle dump
pip install \
autopep8 \
black \
cookiecutter \
flake8 \
get-files-list \
httpie \
ipython \
jupyterlab \
matplotlib \
numpy \
opencv-python \
pandas \
Pillow \
pip-tools \
pyinstaller \
requests \
rich \
scikit-learn \
scipy \
tqdm \
virtualenv
npm install -g \
share-cli \
trash-cli \
tldr \
firebase-tools \
yarn \
prettier \
eslint \
jsdoc \
browser-sync \
npm-check-updates \
speed-test \
http-server-with-auth