Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.9 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What this is
Personal dotfiles managed by Bombadil. Source config files live at the top level of this repo. Bombadil renders them (substituting template variables) into .dots/, then symlinks the rendered files into $HOME / ~/.config according to bombadil.toml.
Applying changes
After editing any source file, re-render and re-link:
bombadil link # render templates -> .dots/ and refresh symlinks
bombadil link -p dark # apply the "dark" profile
bombadil link -p light # apply the "light" profile
Edits do not take effect until bombadil link is run. The repo is registered globally via ~/.config/bombadil.toml (a symlink to bombadil.toml here, created once by bombadil install).
Key conventions
- Never edit
.dots/. It is Bombadil's generated output (not tracked by git) and is overwritten on everybombadil link. Edit the source files at the repo root instead. bombadil.tomlis the source of truth for what gets linked where. Adding a new config means: add the file at the repo root, then add a[settings.dots]entry mappingsource(relative to repo) totarget(relative to$HOME).- Templating: files may contain
{{var}}placeholders substituted from the vars files. The active set isvars = ["dark.toml", "vars.toml"]plus whatever profile is selected.vars.tomlholds identity (email,name,signing_key).dark.toml/light.tomlare profile-specific theme variables (alacritty_theme,helix_theme,zellij_theme,bat_theme,theme). Templated files currently includealacritty/alacritty.toml,helix/config.toml,zellij/config.kdl,gitconfig, andbat/config— switchingthemeretints all apps at once via the profile.
zsh layout
zshenv.zsh→~/.zshenv(env vars, editor detection),zshrc.zsh→~/.zshrc(interactive setup).zshrc.zshsources every file in~/.config/zsh.d/*(linked fromzsh.d/) then every file in~/.config/aliases.d/*(linked fromaliases.d/). Each file is a self-contained conf.d-style snippet for one tool (e.g.zsh.d/git.zsh,aliases.d/cargo.zsh). Add a tool by dropping a new.zshfile in the matching directory — no central registration needed.- Machine-specific overrides are sourced if present and are intentionally not in this repo:
~/.zshenv.local,~/.zshrc.local,~/.aliases.local. - Tool integrations guard on availability with
if (( $+commands[tool] )); then ...— follow this pattern so configs degrade gracefully on machines lacking a tool. The prompt (zsh.d/prompt.zsh) falls back starship → p10k → manjaro.
Submodules
alacritty/themes (and a legacy alacritty-theme) are git submodules pointing at the upstream alacritty color-theme collection. Run git submodule update --init after cloning.