Configuration files for macOS, organized in ~/.config following the XDG Base Directory specification.
This setup moves all zsh configuration to ~/.config/zsh/ while keeping Oh My Zsh in its default location.
# 1. Clone this repo to ~/.config
git clone https://github.com/johnlindquist/config.git ~/.config
# 2. Run the zsh installer
~/.config/zsh/install.sh
# 3. Restart your shell
exec zshIf you prefer to set it up manually:
1. Create ~/.zshenv (the only file needed in your home directory):
cat > ~/.zshenv << 'EOF'
# Bootstrap ZDOTDIR for XDG-compliant zsh config
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
[[ -f "$ZDOTDIR/.zshenv" ]] && source "$ZDOTDIR/.zshenv"
EOF2. Install Oh My Zsh (if not already installed):
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"Oh My Zsh stays at ~/.oh-my-zsh - this setup works with it there.
3. Restart your shell:
exec zsh~/.zshenv # Bootstrap (sets ZDOTDIR, only file in $HOME)
~/.oh-my-zsh/ # Oh My Zsh (unchanged, default location)
~/.config/zsh/
├── .zshenv # XDG environment variables
├── .zshrc # Main config (loads Oh My Zsh)
├── conf.d/ # Modular configs (sourced alphabetically)
│ ├── 00-path.zsh # PATH setup
│ ├── 10-aliases.zsh # Aliases
│ ├── 20-1password.zsh # 1Password CLI integration
│ ├── 30-git.zsh # Git helpers
│ └── 40-ai.zsh # AI CLI tools
├── local.zsh # Machine-specific config (gitignored)
└── install.sh # Installer script
- Aliases: Edit
~/.config/zsh/conf.d/10-aliases.zsh - Machine-specific: Create
~/.config/zsh/local.zsh(gitignored) - New module: Create
~/.config/zsh/conf.d/XX-name.zsh
Files in conf.d/ are sourced in alphabetical order - use numeric prefixes to control load order.
The installer will prompt to install these via Homebrew:
| Tool | Purpose |
|---|---|
| zoxide | Smarter cd (z command) |
| fzf | Fuzzy finder |
| bat | Better cat |
| eza | Better ls |
If you have an existing ~/.zshrc:
- Run
~/.config/zsh/install.sh - Copy any custom config to
~/.config/zsh/local.zsh - Remove or rename
~/.zshrc(no longer needed)
This repo also includes configs for:
- Karabiner - Keyboard customization
- WezTerm - Terminal emulator
- Yabai - Window management (scripts in
scripts/) - Zed - Editor settings
MIT