Skip to content

Latest commit

 

History

History
96 lines (75 loc) · 5.56 KB

README.md

File metadata and controls

96 lines (75 loc) · 5.56 KB

CJ’s dotfiles

Screenshot of my shell prompt

Installation

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!

tl;dr:

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

Things of note

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:

Add custom commands without creating a new fork

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.

Sensible OS X defaults

Lovingly borrowed from @mathiasbynens/dotfiles When setting up a new Mac, you may want to set some sensible OS X defaults:

./.macos

Thanks to…