Basically dotfiles contain the preferred settings of your applications. They can save you much time when you setup your computer from a fresh system, or when you want to sync your settings on multiple devices.
OS X Preferences
My main OS is OS X. All my OS and its applications settings (Finder, Safari, Photos) are placed in my
dotfile. To sync a new fresh system with
my preferences I just need to run
Homebrew is necessary when using OS X. It helps to install packages and tools easy way through the command line. For me it is the first thing that I install on a fresh OS X system.
Homebrew also can help to install apps with Homebrew Cask. It will download and install them automatically.
All your dependencies for your OS X system can be defined in a single
Brefile. It is like a
composer.json file, but for your Mac:
These lines are equivalent to the following commands:
Here is my own Brewfile, where all my installed apps and tools are
listed. Now I have to run simple command
brew bundle to install all my OS X dependencies on a fresh system.
Terminal and Shell
Customizing your shell is as important as customizing your IDE. I prefer to use Zsh. It is like Bash on steroids. And like we have frameworks for programming languages Zsh has it’s own frameworks of plugins and settings, and I prefer OhMyZsh. It has it’s own growing up community, a lot of different plugins and themes. I have chosen Agnoster theme and combined it with Solarized Dark color scheme for iTerm2.
Installation of OhMyZSH requires only one command:
- Install Xcode from the App Store, open it and accept the license agreement
- Install OS X Command Line Tools by running
- Copy public and private SSH keys to
~/.sshand make sure they’re set to 600
- Clone repo to
./install.sh will install Homebrew. Homebrew will start installing all the dependencies from Brewfile. Composer and npm will be installed with their global packages. At the end,
osx file will be sourced to set OS X settings.