Dotfiles for MacOS
How to use these dotfiles
- Dev Fonts
- iTerm 2 + ZSH
Recently I've discovered the world of dotfiles thanks to mathias bynens and xero. Dotfiles allow you to backup, restore, and sync your dev environment. This is great, especially if you have more than one workstation or are migrating to a new machine. After much research and observation of how other people manage their dotfiles, what you see in this repo is a reflection of their efforts as well as my own.
I initially started this repo to help myself learn more about the tools available out there for customizing my dev environment. I also wanted to make sure that all my customizations were backed up and could be installed on any machine. As I continued learning, adding, and breaking things, I thought it would be a good idea to document as much as I could to not only learn, but help others in setting up their dotfiles as well. I hope this repo can help newcomers understand their own environment and aid them in their own creation of a dotfile repo. Be aware that I am still learning, so proceed with caution. If you are uncertain about anything, I highly advise you read the source before executing any of these scripts.
At the moment, this will only work in MacOS. Adding a Linux fork is in my todo. Feel free to help!
Disclaimer: If you decide to use these dotfiles, please fork this repo and review the source code before executing! Proceed at your own risk!
- Download repo
- via git
- via cURL
- Run scripts <--Currently working on these!
- Automatic: ./install.sh
- Manual: stow [folder]
Download and Stage Files
If you are just setting up a new machine, you might not already have git installed. If this is the case, then run the cURL command in your home
$HOME directory. If you already have git, then use git clone. It's imperative you place the dotfiles folder into your home directory. Not sure where that is? Run
echo $HOME. Read Dotfile Management for more details.
cd git clone https://github.com/jonleopard/dotfiles.git && cd dotfiles && chmod +x install.sh
cd curl -#L https://github.com/jonleopard/dotfiles/tarball/master | tar -xzv
If you prefer, you can skip the install.sh script and run stow manually. Just tell stow which dotfiles you want to symlink:
I talk a bit more about stow below in the dotfile management section. Be sure to also check out the links in the resources section.
GNU Stow handles all my dotfiles. I'm using that in unison with Git for backups/versioning. Homebrew handles all my packages and will also install all of my Mac App Store apps as well. ZSH plugins are managed with zplug. I work a bit with Node, so NVM was chosen as my Node version manager. Lastly, Vim-Plug handles all of my neomvim plugins.
There are so many flavors when it comes to dotfile management. I wanted something lightweight and that could run in any *nix environment with little to no dependencies.
All my dotfiles are managed with the extremely light weight GNU Stow. Basically, stow creates & manages symlinks to files that are located in the home directory. This allows me to keep everything in an organized folder called 'dotfiles'. This method makes sharing these files with other users and my other workstations really easy and avoids cluttering the home directory with VCS files.
MacOS Package Management
Homebrew and Macports are pretty much the only mainstream options here. I went with Homebrew. My Brewfile with generated with Homebrew-Bundle. I'm using Homebrew-Cask which will go out and install all of the applications that I tell it to. mas will install all of your Mac App Store apps. All of this is bundled in a list called Brewfile.
ZSH Plugin Management
I've tried OMZ(Oh my ZSH), Prezto, and other ZSH frameworks. Since I'd rather know exactly what's going on in my .zshrc file and add only what I need, I chose to go with zplug.
NVM Allows me to switch between different node versions on the fly. Avoid installing NVM through Homebrew, just use either the cURL or Wget script. Since I'm using ZSH, I added zsh-nvm to my zplugins.
Vim Plugin Management
My vim plugins are managed with Vim-Plug. Vim-Plug also ties in nicely with Neovim. You'll notice that my vim environment is pretty slim at the moment. I'm am still learning how to use vim as my main text editor. So far so good!
Below is a list of some of my favourite dev fonts that go great in your terminal, IDE, Text Editor, etc...
iTerm 2 + ZSH
- GNU Stow
- Dotfile Repos