Opinionated dotfiles repository for Mac OS with zsh and iTerm 2. Including Homebrew, Mac App Store command line, MaterialDark and oh-my-zsh with the Agnoster theme.
Adapted from Danny Thomas' dotfiles - https://github.com/DanielThomas/dotfiles.
- Assuming a clean install, run
xcode-select --install
to install the Developer Tools - Fork and clone the repository
git clone <repopath> ~/.dotfiles
- Start Terminal for installation (iTerm, fonts, color schemes and preferences lists are automatically installed as part of the bootstrap, and iTerm will overwrite settings on exit)
- Run the bootstrap:
cd ~/.dotfiles; ./bootstrap.sh
. You'll be prompted at least once for your password for the Homebrew install - Set
zsh
as your default shell:sudo sh -c 'echo /usr/local/bin/zsh >> /etc/shells'; chsh -s /usr/local/bin/zsh
- Start iTerm. If you see
zsh compinit: insecure directories
warnings, run:compaudit | xargs chmod g-w
- Use
~/.localdotfiles
to keep anything you don't want to make public. It support the same structure as as this repository - In particular, update
~/.gitconfig
:- Update the absolute paths for the includes (JGit doesn't support relative paths, so I have to keep them hard coded unfortunately)
- There is a default include for
.gitconfig_local
to include your user configuration etc. Create it manually, or add agitconfig_local.symlink
file in~/.localdotfiles
Use upgrade_dotfiles
to automatically update everything bootstrapped by the repository.
The repository is ordered by topic. Refer to the readme files in the individual topic directories for details of the features they provide.
Files are processed automatically by .zshrc
or the bootstrap process depending on their extension. Scripts set the environment, manage files, perform installation or enable plugins depending on the file name or extension. Bootstrap can be safely run repeatedly, you'll be prompted for the action you want to take if a destination file or directory already exists.
These files set your shell's environment:
path.zsh
: Loaded first, and expected to setup$PATH
*.zsh
: Get loaded into your environmentcompletion.zsh
: Loaded last, and expected to setup autocomplete
The following extensions will cause files to be created in your home directory:
*.symlink
: Automatically symlinked into your$HOME
as a dot file during bootstrap. For example,myfile.symlink
will be linked as$HOME/.myfile
*.gitrepo
: Contains a URL to a Git repository to be cloned as a dotfile. For examplemyrepo.symlink
will be cloned to$HOME/.myrepo
*.gitpatch
: Namerepo-<number>.gitpatch
to apply custom patches to agitrepo
repository*.otf
,*.ttf
,*.ttc
: Fonts are copied to~/Library/Fonts
during bootstrap*.plist
: Preference lists are copied to~/Library/Preferences
during bootstrap
Installation steps during bootstrap can be handled in three ways:
install.sh
: An installation shellscriptinstall.homebrew
: A list of Homebrew formulas to installinstall.homebrew-cask
: A list of Homebrew casks to installinstall.mas
: A list of App Store apps to installinstall.open
: A list of files to be handled by the default application association using theopen
command
The install.mas
file requires an app id and name.
For example 409183694 Keynote
.
Names may contain spaces.
You can find the app ids using mas search <whatever>
.
- All topic directory names are implicitly added to the plugin list, so you get
osx
andbrew
automatically - Plugins listed in
oh-my-zsh.plugins
files are read and added to this list