A comprehensive macOS development environment configuration with organized structure and automated installation.
.dotfiles/
βββ Brewfile # Homebrew package dependencies
βββ docs/ # Documentation
β βββ README.md # This file
βββ editor/ # Editor configuration
β βββ editorconfig # Cross-editor formatting rules
βββ git/ # Git configuration
β βββ gitconfig # Git settings and aliases
β βββ gitignore # Global gitignore patterns
βββ scripts/ # Installation and utility scripts
β βββ install.sh # Automated installation script
βββ shell/ # Shell configuration
β βββ .zshrc # Zsh configuration
β βββ .aliases # Shell aliases
β βββ .functions # Shell functions
β βββ .history # Shell history configuration
βββ terminal/ # Terminal configuration
βββ iterm2/ # iTerm2 preferences
βββ com.googlecode.iterm2.plist
- macOS
- Internet connection for downloading dependencies
-
Clone the repository:
git clone https://github.com/gddabe/dotfiles.git ~/.dotfiles && cd ~/.dotfiles
-
Run the installation script:
./scripts/install.sh
The script will:
- Install Homebrew (if not present)
- Install all packages from Brewfile
- Set up fzf integration
- Create symbolic links for all configuration files
- Set zsh as the default shell
After running the installation script, configure your git user information:
# Set your git user name
git config --global user.name "Your Name"
# Set your git user email
git config --global user.email "your.email@example.com"Optional: GPG Commit Signing
If you want to sign your commits with GPG:
# Generate a new GPG key
gpg --full-generate-key
# List your GPG keys
gpg --list-secret-keys --keyid-format=long
# Configure git to use your GPG key
git config --global user.signingkey YOUR_KEY_ID
git config --global commit.gpgsign trueVerify that everything is working correctly:
# Check shell configuration
echo $SHELL
which zsh
# Check git configuration
git config --list --show-origin | head -10
# Check key development tools
which gh && gh --version
which jq && jq --version
which eza && eza --version
which ripgrep && rg --version
# Check Docker (if installed)
which docker && docker --version
# Verify SSH permissions (should be 600 for private key)
ls -la ~/.ssh/
# Test git aliases
git aliases | head -5# Set VS Code as default editor
git config --global core.editor "code --wait"
# Set Vim as default editor
git config --global core.editor "vim"# Change history size (default: 10000)
git config --global core.pager "less -FX"
# Adjust diff colors
git config --global color.diff.meta "yellow bold"After running the installation script, configure iTerm2 to use the custom preferences:
# Specify the preferences directory
defaults write com.googlecode.iterm2 PrefsCustomFolder -string "~/.iterm2"
# Tell iTerm2 to use the custom preferences in the directory
defaults write com.googlecode.iterm2 LoadPrefsFromCustomFolder -bool trueNote: Restart iTerm2 after running these commands for the changes to take effect.
-
.zshrc: Main zsh configuration with:- Lazy-loaded nvm
- Pure prompt
- Zsh plugins (syntax highlighting, autosuggestions)
- Fzf integration
- EZA color scheme
-
.aliases: Useful shell aliases including:- Navigation shortcuts (
..,..., etc.) - EZA aliases for modern file listing
- Brew update alias
- SSH key management
- Navigation shortcuts (
-
.functions: Custom shell functions:mkd: Create directory and cd into itfd: Fuzzy find directories with fzfgf: Git diff with fzf previewwww: Start HTTP serverramdisk: Create RAM disk- SSH backup/restore utilities
-
.history: Zsh history configuration with large history size and deduplication
-
gitconfig: Comprehensive git configuration with:- User information
- 20+ useful aliases (
git l,git s,git ca, etc.) - Color settings
- Whitespace handling
- URL shorthands for GitHub
-
gitignore: Global gitignore patterns for common files and OS-specific items
editorconfig: Cross-editor formatting rules:- UTF-8 encoding
- Tab indentation (except YAML: 2 spaces)
- LF line endings
- Automatic whitespace trimming
iterm2/: iTerm2 preferences with:- Dracula color scheme
- Hack Nerd Font
- Custom keyboard shortcuts
- Transparency and visual effects
CLI Tools:
git,coreutils,tldr,bat,z,nvmbtop,dust,gnupg,eza,fzfgh,jq,ripgrep,fd,htop,tree
Shell:
zshwith syntax highlighting and autosuggestions
Applications:
brave-browser,google-chromevisual-studio-code,iterm2karabiner-elementsfor keyboard customizationdockerfor container developmentpostmanfor API testingrectanglefor window management
Fonts:
- SF Pro, SF Mono, DM Serif fonts
- Fira Code Nerd Font, Hack Nerd Font
- Place configuration files in the appropriate directory
- Update
scripts/install.shto create symlinks - Update this README
Edit files directly in their respective directories. Changes will be reflected immediately due to symlinks.
-
Permission denied errors:
chmod +x scripts/install.sh
-
iTerm2 preferences not loading:
- Restart iTerm2 after running the setup commands
- Check that the plist file path is correct
-
Missing fonts:
- Restart your terminal application after font installation
- Verify fonts are installed in Font Book
To remove all symlinks and start fresh:
# Remove symlinks
rm ~/.gitignore ~/.gitconfig ~/.editorconfig ~/.zshrc ~/.aliases ~/.functions ~/.history ~/.iterm2
# Re-run installation
./scripts/install.shCopy SSH keys from old machine:
# Copy .ssh folder contents
cp -r /path/to/old/.ssh ~/Configure cookie blocking:
- Go to
brave://settings/shields/filters - Enable "EasyList-Cookie List"
Import CapsLock configuration:
- Open Karabiner-Elements
- Go to Complex Modifications
- Import from URL:
https://raw.githubusercontent.com/Vonng/Capslock/master/mac_v3/capslock.json
- Fork the repository
- Create a feature branch
- Make your changes
- Test the installation script
- Submit a pull request
This repository is provided as-is for personal use. Feel free to adapt and modify for your own needs.