Warning: If you want to give these dotfiles a try, you should first fork this repository, review the code, and remove things you don’t want or need. Don’t blindly use my settings unless you know what that entails. Use at your own risk!
In general I do the following on a new laptop:
# Install brew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# Install powerlevel10k and some oh-my-zsh plugins
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# Clone repo & bootstrap
mkdir -p ~/code
git clone https://github.com/whoaa512/dotfiles.git ~/code/dotfiles
ln -s ~/code/dotfiles ~/dotfiles
cd ~/code/dotfiles && zsh bootstrap.sh
# [Optional] Run the brew formulae
bash brew.sh
# [Optional] Run the non-brew stuff
bash non-brew.sh
# [Optional] OS X Defaults, review before applying
~/code/dotfiles/.macos
My dotfiles is a fork of the awesome @mathiasbynens/dotfiles and then I have incrementally added/edited things for my personal use over the years.
At a high level, this includes:
- Oh-my-zsh as the general framework for plugins
- powerlevel10k for the theme and some good git speed boosts. Also provides the awesome font with icons
- zsh-autosuggestions plugin to offer recently used commands
- zsh-syntax-highlighting plugin to do some basic shell syntax highlighting
- MacOS sensible defaults from @mathiasbynens/dotfiles (though I don't update super frequently from upstream, and have made slight modifications)
- History search on the up/down arrow keys provided by .inputrc
- and a general install point for the various tools I use/need
If ~/dotfiles/.extras
exists, it will be sourced along with the other files. You can use this to add a few custom commands without the need to fork this entire repository, or to add commands you don’t want to commit to a public repository.
My ~/dotfiles/.extras
looks something like this:
# Git credentials
# Not in the repository, to prevent people from accidentally committing under my name
GIT_AUTHOR_NAME="CJ Winslow"
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
git config --global user.name "$GIT_AUTHOR_NAME"
GIT_AUTHOR_EMAIL="[email protected]"
GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
git config --global user.email "$GIT_AUTHOR_EMAIL"
# Also useful to add anything extra that doesn't make sense for all setups
export PATH="/some/path/my-cool-bin-dir:$PATH"
You could also use ~/.extra
to override settings, functions and aliases from my dotfiles repository. It’s probably better to fork this repository instead, though.
Lovingly borrowed from @mathiasbynens/dotfiles When setting up a new Mac, you may want to set some sensible OS X defaults:
./.macos
- The original author Mathias Bynens!
- @ptb and his OS X Lion Setup repository
- Ben Alman and his dotfiles repository
- Chris Gerke and his tutorial on creating an OS X SOE master image + Insta repository
- Cătălin Mariș and his dotfiles repository
- Gianni Chiappetta for sharing his amazing collection of dotfiles
- Jan Moesen and his ancient
.bash_profile
+ shiny tilde repository - Lauri ‘Lri’ Ranta for sharing loads of hidden preferences
- Matijs Brinkhuis and his dotfiles repository
- Nicolas Gallagher and his dotfiles repository
- Sindre Sorhus
- Tom Ryder and his dotfiles repository
- Kevin Suttle and his dotfiles repository and OSXDefaults project, which aims to provide better documentation for
~/.osx
- Haralan Dobrev
- anyone who contributed a patch or made a helpful suggestion