Personal dotfiles + bootstrap scripts for setting up a new macOS machine with my preferred apps and configs.
Run the setup script:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/dadigu/dotfiles/main/setup/init.sh)"curl -fsSL https://raw.githubusercontent.com/dadigu/dotfiles/main/setup/init.sh | lessNote: This script installs software, applies macOS defaults, and may prompt for input. Some changes require a logout/restart and some apps require manual privacy approvals.
I use GNU Stow to symlink dotfiles:
cd ~/dotfiles
stow <package-name>Useful commands:
- Dry run (see what would happen):
stow --no --verbose=2 <package-name>
- Restow (apply changes to an already-stowed package):
stow --restow <package-name>
- Unstow:
stow --delete <package-name>
- aerospace
- ghostty
- lazygit
- leader-key1
- nvim
- sketchybar
- skhd
- tmux
- vim
- wezterm
- yabai
- yazi
- zellij
- zsh
Some things can’t (or shouldn’t) be fully automated:
- yabai / skhd
- System Settings → Privacy & Security → Accessibility
- Enable for the relevant binaries/apps you use to launch them (Terminal/iTerm2, yabai, skhd).
- Docker Desktop
- Launch Docker Desktop once to complete setup.
- Login/setup apps
- 1Password, Raycast/Alfred, VPN, browsers, etc.
If you use the Karabiner config in this repo:
cd karabiner
npm install
npm run build- Commit and push changes in all Git repos
- Review Git stashes and convert important ones to patch files
- Backup important documents not synced to iCloud/Drive
- Backup app data that doesn’t sync automatically
- Export critical data from local databases
- Backup SSH keys (
~/.ssh) and config (~/.ssh/config) - Backup GPG keys (if used)
- Confirm 2FA/authenticator backups (if applicable)
- Verify password manager vault is fully synced
- Note down/licenses for paid apps (if not account-based)
Open a new terminal session, or run:
if [ -x /opt/homebrew/bin/brew ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
elif [ -x /usr/local/bin/brew ]; then
eval "$(/usr/local/bin/brew shellenv)"
fiPreview first:
stow --no --verbose=2 <package-name>Then move/backup conflicting files and re-run stow.
Footnotes
-
Change config directory to
~/.config/leader-keyin app settings ↩