SkillAgentSearch skills...

Dotfiles

๐Ÿ”ง My dotfiles on ๏ฃฟ macOS for Neovim, Zsh, kitty, lf, sketchybar, etc

Install / Use

/learn @rockyzhang24/Dotfiles

README

.dotfiles

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

platform last commit

demo

โ†— Like the color theme? Please check arctic.nvim.

โœจ Contents

๐Ÿ”ฅ Text Editor

๐Ÿš Shell

๐Ÿ“Ÿ Terminal Emulator

๐Ÿช„ Tiling Window Manager

๐Ÿ—ƒ๏ธ Console File Manager

๐ŸชŸ Menu Bar

โŒจ๏ธ Keyboard Customizer

๐Ÿงถ Others

๐Ÿ’ก 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 live:

alias dot='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:

dot config status.showUntrackedFiles no

Set up the remote repository for syncing:

dot remote add origin https://github.com/rockyzhang24/dotfiles.git

Done! Now we can manage our dotfiles.

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

Clone to another machine

Clone the dotfiles into a bare repository:

git clone --bare https://github.com/rockyzhang24/dotfiles.git $HOME/dotfiles

Define the alias in the current shell scope:

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

Backup the stock configuration files that will be overwritten:

mkdir -p .config-backup
dot checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{}

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

dot checkout

Don't show untracked files and directories:

dot config status.showUntrackedFiles no

Done!

Notes

In order for vim-fugitive to recognize this bare repo, the following additional configurations are required:

dot config core.bare 'false'
dot config core.worktree "$HOME"
View on GitHub
GitHub Stars228
CategoryDevelopment
Updated13h ago
Forks16

Languages

Lua

Security Score

85/100

Audited on Apr 9, 2026

No findings