A set of opinionated configuration files for command line tools like vim, zsh, git etc.
It uses pragmatic approaches like zaw, rcm or SpaceVim to configure the command line environment as quickly as possible without fiddling too much with nitty gritty implementation details.
The installation is tested on macOS 12.1 and subject to change without prior notice. Use at your own risk :)
- Clone the
dotfiles
repo to your HOME folder:
git clone https://github.com/ctrabold/dotfiles.git $HOME/dotfiles
- Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install required tools:
brew bundle --no-lock --file $HOME/dotfiles/Brewfile
- Set
zsh
as your default login shell:
sudo chsh -s "$(command -v zsh)" "${USER}"
- Clone
zaw
repo to your HOME folder:
git clone https://github.com/zsh-users/zaw.git $HOME/zaw
- Link the symlink configuration file:
ln -s $HOME/dotfiles/rcrc $HOME/.rcrc
- Verify the symlinks with this command:
lsrc
This command lists all symlinks that are going to be created so you can review the setup before you apply the settings in the next step.
Once you're happy with the result go ahead and create the symlinks to each dotfile:
rcup -v
You can safely run this command multiple times to update the symlinks e.g. if you add more dotfiles to the dotfiles
folder later.
- (optional): Install Oh-My-ZSH: https://ohmyz.sh/#install
- (optional): install Janus Vim Setup: https://github.com/carlhuda/janus#installation
- (optional): install additional apps:
brew bundle --no-lock --file $HOME/dotfiles/Brewfile.apps
- (optional): Create a dedicated SSH key for work:
ssh-keygen -t ed25519 -C "[email protected]" -f ~/.ssh/work_key
- (optional): Use the work key on certain work directory by adjusting
~/gitconfig.local
:
vi ~/gitconfig.local
[includeIf "gitdir:~/workspace/customer"]
[user]
email = "[email protected]"
[core]
sshCommand = "ssh -i ~/.ssh/work_key"
git configuration and commit templates
- Ignores a global set of files through
~/.gitignore_global
- Sets a bunch of
aliases
in~/.gitconfig
- Best practise commit message in
~/.gitmessage
Ruby configuration
- Never download documentation for Rubygems to save space
~/dotfiles/zsh/aliases.zsh
~/dotfiles/zsh/functions.zsh
tmux configuration:
- The
tmux
config file is a modified version of from the tmux book.
vim configuration:
- The vim config is based on SpaceVim.
- Override the files directly (not recommended because it makes it harder to pull changes from upstream due to potential merge conflicts).
- Create a folder named
dotfiles-local
and store your custom files there. These will overrule the files from thedotfiles
folder. - Create 'local' dotfiles with a
.local
file extension:
~/.aliases.local
~/.gitconfig.local
~/.tmux.conf.local
~/.zshrc.local
These files are included by the respective files. Be aware that not all files support .local
files.
Say you want to add your own aliases to your shell environment.
Instead of adding them to the 'core' file zsh/aliases.zsh
I recommend to create a file called ~/.aliases.local
which might look like this:
alias todo='$EDITOR ~/.todo'
For git
your ~/.gitconfig.local
might look like this:
[alias]
l = log --pretty=colored
[pretty]
colored = format:%Cred%h%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset
[user]
name = John Doe
email = [email protected]
Your ~/.zshrc.local
might look like this:
# recommended by brew doctor
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
You can also override the core files completely or add your own by storing them inside the dotfiles-local
folder.
This instructs rcup
to use your files upon the next rcup
run (see usage instructions above).
To cleanup the dock I use the commandline tool dockutil
:
brew install dockutil
dockutil --remove all
This will remove all the default apps in the dock. Now I can add apps that I find useful.
I personally store only a handful apps in the dock, because I use the search feature to open apps either with the built in Spotlight or 3rd party apps like Alfred.
This command installs the common tools I use on a regular basis:
brew bundle --no-lock --file=~/dotfiles/tag-darwin/homebrew/Brewfile
You can omit the --no-lock
if the ENV variable HOMEBREW_BUNDLE_NO_LOCK
is set.
The git setup of NVM provides the most straightforward solution in my opinion.
It is described here: https://github.com/nvm-sh/nvm#git-install
After that install the node version(s) you desire: nvm install 12
Use SDKMan and follow the installation step:
curl -s "https://get.sdkman.io" | bash
Then head over to their wiki to read up on the installation steps for each Java tool: https://sdkman.io/usage
- These files are heavily inspired by thoughtbot, inc. Thank you for your inspiring work! The initial versions were inspired by the awesome folks at peepcode.
tmux
is awesome - Thetmux
book helped me getting used to it and it's fun to read. Thetmuxinator
gem makestmux
even more fun!- My zsh config is based on oh-my-zsh.