Personal configuration files for macOS development environment, managed with GNU Stow for easy deployment and maintenance.
Install Homebrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Install Stow:
brew install stowClone the repository and Setup Symlink:
cd ~
git clone https://github.com/MMcClure11/.dotfiles
cd .dotfiles
stow -t ~/.config .configGNU Stow is a symlink farm manager that creates symbolic links from a source directory to a target directory, maintaining the directory structure. Here's how the magic happens:
When you run stow -t ~/.config .config, Stow:
- Analyzes the source structure in
.dotfiles/.config/ - Creates symbolic links in the target directory
~/.config/ - Preserves directory hierarchy exactly as it exists in the source
- Manages conflicts by checking for existing files/directories
Example transformation:
Before:
~/.dotfiles/.config/nvim/init.lua
After stow:
~/.config/nvim/init.lua → ~/.dotfiles/.config/nvim/init.lua
For more advanced usage and options like --ignore=regexp, see the GNU Stow manual.
Most modern applications follow the XDG Base Directory Specification, which defines standard locations for user-specific files:
~/.config/- User configuration files~/.local/share/- User data files~/.cache/- User cache files
When you launch an application like Neovim, here's what happens:
- Neovim starts up and needs to find its configuration
- Checks XDG_CONFIG_HOME environment variable (defaults to
~/.config) - Looks for
~/.config/nvim/directory - Loads configuration files from that directory (like
init.lua)
The symlink is transparent - Neovim doesn't know or care that
~/.config/nvim/ is actually a symbolic link pointing to
~/.dotfiles/.config/nvim/. It just follows the link and loads the
configuration.
- Centralized management: All your configs live in one git repository
- Transparent to applications: Programs find configs exactly where they expect them
- Easy updates: Edit files in your dotfiles repo, changes appear immediately
- Version control: Track configuration changes with git
- Portability: Clone and stow on any new machine
This dotfiles repository has evolved in its organization and deployment strategy. Understanding both approaches helps explain the current structure and why we made the change.
The unified .config approach simplifies management by organizing all
configurations under a single directory structure that mirrors the standard
~/.config layout.
stow -t ~/.config .configHow it works:
- All application configs are organized under
.dotfiles/.config/ - A single stow command links the entire
.configdirectory - Creates symlinks like:
~/.config/nvim→~/.dotfiles/.config/nvim - Maintains clean separation while reducing command complexity
Directory structure:
~/.dotfiles/
└── .config/
├── bat/
├── fish/
├── git/
├── kitty/
├── nvim/
├── meks_nvim/
└── starship/
The individual stow approach required separate stow commands for each application:
stow nvim
stow fish
stow bat
# ... and so on for each configWhy we switched:
- Reduced complexity: One command instead of multiple
- Better organization: Follows XDG Base Directory specification
- Easier maintenance: Adding new configs doesn't require additional stow commands
- Cleaner structure: All configs live under the standard
~/.configpath
The old approach worked by having individual directories at the root level
(like nvim/, fish/) that would be stowed directly to the home
directory, but the new approach provides better organization and follows modern
configuration standards.
- bat - Cat clone with syntax highlighting
- fish - Friendly interactive shell
- git - Version control configuration
- kitty - GPU-accelerated terminal emulator
- starship - Cross-shell prompt
- nvim - Neovim configuration
- meks_nvim - Custom Neovim setup
brew bundle add --global glow
cat ~/.Brewfile | rg glow
brew bundle install --globalAfter initial user setup, open terminal. Run
xcode-select --installwhich is required to be able to use git commands. Takes ~10 minutes.
Open up Safari, navigate to https://github.com/meksquest/.dotfiles. Copy and paste the below command into the terminal. You got this.
/bin/sh -c "$(curl https://raw.githubusercontent.com/meksquest/.dotfiles/refs/heads/main/scripts/meks-setup.sh)"Happy configuring! 🚀