https://github.com/rockyzhang24/dotfiles
๐ง My dotfiles on ๏ฃฟ macOS for Neovim, Zsh, kitty, lf, sketchybar, etc
https://github.com/rockyzhang24/dotfiles
alacritty config dotfiles fzf ghostty karabiner-elements kitty lf linux macos neovim ranger sketchybar tmux vifm vim wezterm yabai zsh
Last synced: 4 months ago
JSON representation
๐ง My dotfiles on ๏ฃฟ macOS for Neovim, Zsh, kitty, lf, sketchybar, etc
- Host: GitHub
- URL: https://github.com/rockyzhang24/dotfiles
- Owner: rockyzhang24
- Created: 2020-04-29T05:38:32.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-10-08T00:09:47.000Z (4 months ago)
- Last Synced: 2025-10-08T02:31:52.391Z (4 months ago)
- Topics: alacritty, config, dotfiles, fzf, ghostty, karabiner-elements, kitty, lf, linux, macos, neovim, ranger, sketchybar, tmux, vifm, vim, wezterm, yabai, zsh
- Language: Lua
- Homepage:
- Size: 6.12 MB
- Stars: 208
- Watchers: 6
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# .dotfiles
My dotfiles for `macOS` and `Linux`. Just cherry pick the piece of code you totally understand.



โ Like the color theme? Please check [arctic.nvim](https://github.com/rockyzhang24/arctic.nvim).
# โจ Contents
### ๐ฅ Text Editor
* [Neovim](https://neovim.io) ([config](./.config/nvim/))
### ๐ Shell
* [Zsh](https://www.zsh.org) ([config](./.config/zsh/))
* Use [Zimfw](https://zimfw.sh) framework
* The prompt is [Starship](https://starship.rs/)
### ๐ Terminal Emulator
* [Ghostty](https://ghostty.org/) ([config](./.config/ghostty/))
* [Kitty](https://sw.kovidgoyal.net/kitty/) ([config](./.config/kitty/))
* [Wezterm](https://wezfurlong.org/wezterm/) ([config](./.config/wezterm/))
* [Alacritty](https://alacritty.org) ([config](./.config/alacritty/))
### ๐ช Tiling Window Manager
* [yabai](https://github.com/koekeishiya/yabai) ([config](./.config/yabai/))
* [skhd](https://github.com/koekeishiya/skhd) ([config](./.config/yabai/))
### ๐๏ธ Console File Manager
* [lf](https://pkg.go.dev/github.com/gokcehan/lf) ([config](./.config/lf/))
* [Vifm](https://vifm.info) ([config](./.config/vifm/))
* [Ranger](https://ranger.github.io) ([config](./.config/ranger/))
### ๐ช Menu Bar
* [Sketchybar](https://github.com/FelixKratz/SketchyBar) ([config](./.config/sketchybar))
### โจ๏ธ Keyboard Customizer
* [Karabiner-Elements](https://karabiner-elements.pqrs.org) ([config](./.config/karabiner/))
### ๐งถ Others
* [Tmux](https://github.com/tmux/tmux) ([config](./.tmux.conf))
* [fzf](https://github.com/junegunn/fzf) ([config](./.config/fzf/))
* My scripts: [bin](./.config/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:
```bash
git init --bare $HOME/dotfiles
```
Create an alias in zshrc, tell Git where the history and the working tree live:
```bash
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`:
```bash
dot config status.showUntrackedFiles no
```
Set up the remote repository for syncing:
```bash
dot remote add origin https://github.com/rockyzhang24/dotfiles.git
```
Done! Now we can manage our dotfiles.
```bash
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:
```bash
git clone --bare https://github.com/rockyzhang24/dotfiles.git $HOME/dotfiles
```
Define the alias in the current shell scope:
```bash
alias dot='git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'
```
Backup the stock configuration files that will be overwritten:
```bash
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`:
```bash
dot checkout
```
Don't show untracked files and directories:
```bash
dot config status.showUntrackedFiles no
```
Done!
## Notes
In order for [vim-fugitive](https://github.com/tpope/vim-fugitive) to recognize this bare repo, the following additional configurations are required:
```bash
dot config core.bare 'false'
dot config core.worktree "$HOME"
```