Config files for my environment.
- GNU Stow (optional). Use stow to easily create links to these files in your home directory.
In your home directory, clone the repository:
$ git clone [email protected]:neapsix/.dotfiles.git
Then, create symlinks in your home directory to the files.
If you're setting up a Mac for the first time, run the macos_setup.sh
script.
Use stow
to easily create symlinks for mulitple files at a time. Just cd
to the directory and use stow
to link these files. By default, the command creates links one level up in the tree for all the files within the specified directory.
For example, in ~/.dotfiles/
run the following commands:
$ stow bash
$ stow nvim
$ stow vim
$ stow wezterm
$ stow zsh
to create ~/.bash_profile@
, ~/.bashrc@
, the ~/.config/nvim@/
directory, ~/.vimrc@
, the ~/.config/wezterm@/
directory, ~/.zprofile
, ~/.zshenv@
, and ~/.zshrc@
.
If you don't want to use stow
, you can also create the links manually. Using directories as in the previous example, from your home directory, run the following commands:
$ ln -s .dotfiles/bash/.bash_profile .bash_profile
$ ln -s .dotfiles/bash/.bashrc .bashrc
$ ln -s .dotfiles/nvim/.config/nvim .config/nvim
$ ln -s .dotfiles/vim/.vimrc .vimrc
$ ln -s .dotfiles/nvim/.config/wezterm .config/wezterm
$ ln -s .dotfiles/zsh/.zprofile .zprofile
$ ln -s .dotfiles/zsh/.zshenv .zshenv
$ ln -s .dotfiles/zsh/.zshrc .zshrc
Run the script to set up System Preferences and hidden settings for macOS:
$ ./macos_setup.sh
Credit to Brandon Invergo (Using GNU Stow to manage your dotfiles) and Jon Leopard (Dotfile Management With GNU Stow) for the helpful blog posts that taught me this approach. Credit to Quentin Giraud (aethys256/notes) for many of the macOS defaults tweaks.