My configuration files for my development environment. Inspired by everyone else's dotfiles and especially thoughtbot's approach.1 I don't need their entire setup, but the basic approach is the right one: sync .rc files in ~/ with a repo you control via symlinks.
- Install Homebrew
I loved oh my zsh, but wanted to keep things light and try rolling my own setup. It includes:
- Plugins: autojump, zsh-autosuggestions, zsh-history-substring-search, zsh-syntax-highlighting
- various aliases and a few functions with completions
- starship prompt & export of my terminal theme (based on Github Dark/Light vscode themes)2:
Dark | Light |
---|---|
This setup could be more optimized - zsh is complex, and I'm no expert. I will try to get some time for it, but it works, it works fast, and I want to build other things at the moment.
home/.zshrc is the main configuration file, which imports more config from the zsh/
directory.
- Homebrew (see
Brewfile
) - Ruby (see
home/.default-gems
)
- Mise-en-place version manager (Ruby & Node.js mainly, but will handle other languages)
Various dotfiles are in home/
and config/
.
Take this and modify as you like. Currently, it requires the repo directory to be ~/.dotfiles
.3 It will set up symlinks in ~/
pointing to the files in ~/.dotfiles/home/
and symlinks in ~/.config/
pointing to the files in ~/.dotfiles/config/
.
You will need to modify scripts if you want to use a different directory/structure.
Installs all packages/plugins.
brew bundle
You have an untracked .somerc
file that you want to bring into your configs.
scripts/home_to_dotfiles.sh .somerc
This moves the file(s) to ~/.dotfiles/home/
and symlinks to them from ~/
. It accepts multiple files (space-separated).
You have a new machine, or want to make sure things are sync'd up:
scripts/link_dotfiles.sh
This will create a symlink in ~/
for any files in ~/.dotfiles/home/
.
To create symlinks for the files in /config/
(with same directory structure), run:
scripts/link_dot_config_files.sh
- Maccy Clipboard Manager One copied item is simply not enough.
# trailing slash is important
cp -RL path/to/directory/ ~.dotfiles
rm -rf path/to/directory
Footnotes
-
I tried to get thoughtbot's
rcm
to work for me without cloning their repo, but ran into some issues. In particular, I wanted to keep the repo root directory clean and store files in ahome/
directory (as rc files are in~/
). I could not get the .rcrc DOTFILES_DIRS environment variable to work for all of the operations. ↩ -
You can grab a vscode theme's ansi colors by running "Developer: Generate Color Theme From Current Settings" from the command palette (
terminal.ansi.[ansiColor]
settings). ↩ -
If you accidentally put it elsewhere, you can safely move a git directory with: ↩