This repository contains public dotfiles including various configuration files, shell utilies, plugins, etc (i.e. dotfiles). There is also a private repository containing private dotfiles like ssh info.
I'm using Dotbot to manage dotfiles. Tutorial on Dotbot by Anish (the author, also one of the lecturers of MIT-Missing-Semester).
There are many different approaches other than Dotbot, see https://dotfiles.github.io/
- zsh plugins are not placed in default folder (
$ZSH/custom
), but inZSH_CUSTOM="$HOME/.zsh/custom"
. The default position is inside oh-my-zsh repo, causing repos (omz vs plugins) nesting with each other and hard to maintain in dotbot (clone order, dirty repo and other problems). If there is a better way, please let me know. - conda
conda init
shoud be placed in~/.shell_local_after
. This is now automated by assumingconda init zsh
append 15 lines to~/.zshrc
.- assuming conda envs are installed in
~/.conda
, useconda_pull
to rsync from remote.
- vscode settings are not maintain by dotfiles, vscode has its own way to sync its settings.
- If you are working with vscode remote, basically you don't need to sync your settings because you settings is used on remote by default, but you should specify what extensions to install on remote for that extensions are not automatically installed on remote.
- tmux:
- oh-my-tmux
- using Fira Font as powerline font for tmux
First, generate new ssh key and add it to github (more instructions here). Then, clone and install dotfiles.
git clone [email protected]:RmZeta2718/dotfiles_pub.git
cd dotfiles_pub
./install
Add a new dotfile ~/.foo
:
mv ~/.foo ~/.dotfiles/foo
# Add a new link for `foo` in install.conf.yaml
~/.dotfiles/install
# commit changes to git
Add a git submodule (eg. plugins) ~/vim/foo
:
cd ~/.dotfiles
mkdir -p vim # make parent directory
# If submodule is already cloned to there, rm -rf it first
git submodule add ${git_link_to_foo} vim/foo # add submodule, specify path explicitly
# Add a new link for `vim` in install.conf.yaml
# commit changes to git
Delete all dotfiles installed by this repo:
./uninstall
Upgrade all submodules:
git submodule update --recursive --remote
# commit changes
# on another machine, run dfu, that is:
git pull
./install # the key is: git submodule sync --recursive
If a directory is managed by both public and private Dotbot repos(eg. ~/.ssh
, ~/.config
etc.), then you can't directly symlink the directory due to conflict. The solution is to link each file in these directories, explicitly or using wildcard(glob).
Extra initialization steps after ./install
. They are not yet covered by Dotbot, still working on it to automate.
- tldr
- submodule init shoud be placed before file mapping