/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)"brew bundle --file=~/dotfiles/BrewfileFrom the dotfiles directory:
cd ~/dotfiles
stow zsh git hammerspoon keyboardlaunchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.local.KeyRemapping.plistYou may need to add hidutil to your input monitoring permissions. It's in /usr/bin, hidden folder.
mkdir -p ~/.hammerspoon/Spoons
curl -fsSL "https://github.com/Hammerspoon/Spoons/raw/master/Spoons/ReloadConfiguration.spoon.zip" -o /tmp/ReloadConfiguration.spoon.zip
unzip -qo /tmp/ReloadConfiguration.spoon.zip -d ~/.hammerspoon/Spoons
rm /tmp/ReloadConfiguration.spoon.zipbrew update && brew upgradeInstall it, then update the Brewfile:
brew install <package>
brew bundle dump --file=~/dotfiles/Brewfile --force-
Create a directory in
~/dotfilesmirroring the home directory structure. For example, to manage~/.config/foo/config.toml:mkdir -p ~/dotfiles/foo/.config/foo mv ~/.config/foo/config.toml ~/dotfiles/foo/.config/foo/config.toml -
Stow it:
cd ~/dotfiles stow foo
-
Add the new package name to the
stowcommand in the Setup section above.
Edit the files directly in ~/dotfiles/ (e.g. ~/dotfiles/zsh/.zshrc). Since stow creates symlinks, changes take effect immediately — no re-stow needed.
cd ~/dotfiles
stow -D <package>This removes the symlinks from your home directory without deleting the source files.
cd ~/dotfiles
git add -A && git commit -m "description of change"
git pushOn another machine, pull and re-stow:
cd ~/dotfiles
git pull
stow zsh git hammerspoon keyboard