These dotfiles are configured for OSX, but you may find that some of it applies to other *NIX systems. I'm using alacritty as my terminal, and the nord theme. The configuration relies on Nerd Font symbols; personally I'm using Hack (which is installed by the Brewfile), but any Nerd Font will work.
The Brewfile will install a suite of software I tend to install on all of my machines. For development, I use asdf to manage CLI tool versions, neovim as my editor, bash as my shell, and tmux to make my terminal more powerful; the latest version of these will be installed by the Brewfile, as well as a few other command line tools I find useful as a developer:
- bat - like cat but better
- fd - like find but way easier
- fzf - fuzzy matching for file names and command completion
- jq - parse json on the command line
- ripgrep - like grep but way faster
- thefuck - for fixing common typos
- tig - for navigating git history
- tldr - like man pages but more condensed
The Brewfile will also install some other programs that I tend to install on all of my machines, such as:
- alfred - like Spotlight but more powerful
- discord - for keeping in touch with friends
- flux - save your eyes from the blue light
- keybase - encryption with friends
- messenger - for keeping in touch with friends who refuse to change
- obsidian - for note taking
- slack - for work and play
- stay - make windows stay put, even when switching monitors
- tailscale - private vpn
All of the software you'll need is installed by homebrew, so the first thing you'll want to do is install that. See the website for instructions.
Clone this repo to your home directory. The name you give the repo doesn't
matter, but it'll make your life easier if it's in your home directory. For
example, this will name the directory ~/.dotfiles:
git clone https://github.com/bmatcuk/dotfiles.git ~/.dotfilesNext, run the following in this directory to install all the software:
cd ~/.dotfiles
brew bundleAfter all of the software is installed, you'll need to run a few commands to setup the software:
Install the tmux-256color.terminfo:
sudo tic -xe tmux-256color tmux-256color.terminfoTo use the version of bash installed by homebrew instead of OSX's default (outdated) version of bash, run:
echo "$(brew --prefix bash)/bin/bash" | sudo tee -a /etc/shells
chsh -s "$(brew --prefix bash)/bin/bash"Now that everything is setup, you can use stow to create symbolic links to the dotfiles. These instructions assume that you've cloned this repo to your home directory as suggested above. If you have not, you'll need to set stow's "target directory" to your home directory. See stow's documentation.
Note that some of the dotfiles end up in shared directories, which might not
exist yet. For example, ~/.config or ~/.local. If these directories do not
exist, stow will do the simpliest thing, which is symlink them. Later, when
some other program tries to save something in those directories, they'll end up
copied into this dotfiles repo because of the symlink. To avoid that, we'll
create a few directories first:
mkdir -p ~/.config/nvim
mkdir -p ~/.local/share
mkdir ~/.local/state
mkdir ~/.gnupg
chmod 0700 ~/.gnupg
mkdir ~/.sshdotfiles for each utility are in their own directory. For example, to install my bash dotfiles, you'd simply run the following while in this repo's directory:
stow bashEach dotfile can be installed individually by running stow on the appropriate directories.
In addition to configuration for various command line tools, I also have some configuration for a few linting tools. These are located in directories named after the programming language, such as javascript or css.
If you decide to use the bat dotfiles, you'll need to run the following after
running stow bat:
bat cache --buildAfter installing fzf and running stow bash, you need to install the fzf bash
scripts:
$(brew --prefix fzf)/install --no-zsh --no-fishAnswer yes to auto-completion and key bindings, but answer no to updating the shell configuration file.
After running stow tmux and starting tmux, install plugins by typing
prefix + I - that's the tmux prefix (typically Ctrl+B) followed by Shift+i.
After running stow nvim, you'll need to install python2, python3, and node
(via asdf). Next, you'll need to run:
pip3 install pynvim
npm install -g neovim
nvim +PlugInstall +UpdateRemotePluginsThe files for fortune and cowsay must be linked to the respective share
directories. If these were installed via homebrew, the following will work:
stow -t "$(brew --prefix fortune)/share" fortune
stow -t "$(brew --prefix cowsay)/share/cowsay" cowsayOtherwise, this will probably work:
stow -t /usr/local/share fortune
stow -t /usr/local/share cowsayThe cowsay files come from Paul Kaefer's excellent cowsay-files repo. I have not included the true color cows, and I removed ghostbusters.cow and vader.cow because my install of cowsay already included them.
Sometimes you want to make changes to configs on a per-machine basis. For example, you might need some work-specific environment variables. Some configs have support for importing files for this purpose so you don't need to worry about accidentally committing these things to git:
~/.bash_profile.local~/.gitconfig.local~/.ssh/config.local~/.config/nvim/local.vim
Here are a few manual changes I make when setting up a new system:
defaults write com.apple.dock tilesize -int 32
defaults write com.apple.dock size-immutable -bool yes
killall Dock