github github
stars 158
issues 0
subscribers 6
forks 10



23 hours ago


My dotfiles for macOS and Linux. Just cherry pick the piece of code you totally understand.

platform last commit

config-demo For the color theme, check arctic

✨ Contents

🔥 Text Editor

Neovim: [config]

🐚 Shell

Zsh: [config]

🛠️ Terminal Emulator

Kitty: [config]

Wezterm: [config]

Alacritty: [config]

🪄 Tiling Window Manager

yabai: [config]

skhd: [config]

🗃️ Console File Manager

lf: [config]

vifm: [config]

ranger: [config]

⌨️ Keyboard Customizer

Karabiner-Elements: [config]

🧶 Others

Tmux: [config]

fzf: [config]

My scripts: bin

💡 How I am managing the dotfiles

Using a bare repository. The dotfiles can reside where they are. No symlinks needed.

Initial setup

Create a bare repository to store the history.

git init --bare $HOME/dotfiles

Create an alias in zshrc, tell Git where the history and the working tree (snapshot) live.

alias cfg='git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'

Tell Git not to show all the untracked files, otherwise all files under $HOME will be shown when running git status.

cfg config status.showUntrackedFiles no

Set up the remote repository for syncing

cfg remote add origin

Done! Now we can manage our dotfiles.

cfg status
cfg add ~/.config/zsh
cfg commit -m "zsh config"
cfg push origin master

Clone to another machine

Clone the dotfiles into a bare repository.

git clone --bare $HOME/dotfiles

Checkout the actual content from the bare repository to $HOME.

git --git-dir=$HOME/dotfiles/ --work-tree=$HOME checkout



If using vim-fugitive in Neovim, to make it work with this bare repo correctly, we should modify ~/dotfiles/config as below


  bare = false
  worktree = /Users/rockyzhang/