Install homebrew & git manually:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install git
-
setup oh-my-zsh:
1.1 install oh-my-zsh:
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
1.2 install zsh-syntax-highlighting plugin:
git clone --filter=blob:none https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
1.3 install zsh-autosuggestions plugin:
git clone --filter=blob:none https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
1.4 install Powerlevel10k theme:
git clone --filter=blob:none https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
-
clone dotfiles repo:
git clone --filter=blob:none https://github.com/waynerv/dotfiles.git ~/dotfiles
-
install homebrew formulaes & casks:
brew bundle install ~/dotfiles/Brewfile
-
install pipx packages:
for p in $(cat ~/dotfiles/pipx.json | jq -r '.venvs[].metadata.main_package.package_or_url'); do pipx install --index-url https://pypi.tuna.tsinghua.edu.cn/simple $p; done
-
restore dotfiles using stow:
cd ~/dotfiles stow --adopt */ git reset --hard
-
install asdf plugins:
cd ~ for plug in {golang,python,nodejs,rust}; do asdf plugin add $plug; done asdf install
-
install nerd font Hack Nerd Font Mono
-
install tmux-256color terminfo:
/usr/bin/tic -x -o $HOME/.local/share/terminfo ~/dotfiles/tmux-256color.src
-
import configuration file of iterm2 and raycast.
mkdir -p ~/dotfiles/<package>
mv ~/<dotfile> ~/dotfiles/<package>/<dotfile>
cd ~/dorfiles
stow <package>
Example:
❯ pwd
/Users/waynerv/dotfiles
❯ find nvim
nvim
nvim/.config
nvim/.config/nvim
nvim/.config/nvim/init.vim
nvim/.config/nvim/autoload
nvim/.config/nvim/autoload/plug.vim
❯ stow --target=/Users/waynerv nvim
❯ ls -l ~/.config/nvim
lrwxr-xr-x 1 waynerv staff 29 5 21 22:36 /Users/waynerv/.config/nvim -> ../dotfiles/nvim/.config/nvim
just run make backup
. This will backup homebrew and pipx changes:
brew bundle dump --describe --force --file=~/dotfiles/Brewfile
pipx list --json > ~/dotfiles/pipx.json