This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
A personal Arch Linux dotfiles repo. It is not a library or app — there is no build, lint, or test suite. Most files are configuration that gets symlinked into $HOME (or /etc) by setup.sh. The handful of "code" lives in bin/ (bash + Python utility scripts), config/xmonad/ (Haskell), and config/nvim/init.vim.
setup.sh is the single entrypoint and the source of truth for what this repo does. Read it before adding anything that needs installation or linking.
install_everythingcalls a tree ofsetup_*functions. Each one is idempotent: it installs packages viaensure_packages_exist/ensure_aur_packages_exist, then symlinks config vialink_dotfile/link_etc_dotfile.link_dotfile foo/barsymlinks$HOME/.foo/bar→$DOTFILES_DIR/foo/bar. That convention is why top-level paths look likeconfig/,gnupg/,ssh/, etc. — they map to~/.config/,~/.gnupg/,~/.ssh/.link_etc_dotfile foo/barsymlinks/etc/foo/bar→$DOTFILES_DIR/etc/foo/bar(needs sudo). Anything underetc/is system-level.- When adding a new config file or script: add or extend the appropriate
setup_*function so it's installed and linked, then wire that function into the rightsetup_*group if it's not already called transitively. - The script assumes Arch with
pacmanandyay. Don't add cross-distro abstractions — it's explicitly a personal setup. set -euo pipefailis on; commands must tolerate it.
bin/— personal scripts on$PATH(the directory is symlinked to~/bin). Mostly bash, a few Python. Dependencies for each script are declared asensure_packages_existcalls insetup_bin_dirwith a comment naming the script — keep that pattern when adding scripts.config/xmonad/— Haskell XMonad config built withstack. The three submodules underxmonad-libs/(singlespacing, contexts, pseudotiling) are vendored XMonad libraries linked in viaconfig/xmonad/lib/XMonad/. Rebuild withxmonad --recompile(the binary lands in~/.cache/xmonad/andbin/xmonadis a symlink to it).config/nvim/init.vim— Neovim config using vim-plug. Plugins are grouped by load-time cost (fast / slow / very slow) — preserve that grouping if adding plugins. LSP servers, formatters, linters, and tree-sitter CLI are installed viasetup_neoviminsetup.sh, not via Mason.config/systemd/user/— user-level systemd units (backup, reminder, tad, watchdog, background, git-maintenance). These reference scripts inbin/, so changes to a script may affect a timer.etc/— system-level configs (pacman, NetworkManager dispatcher, udev rules, security/limits, sysctl, X11 keyboard). Linked into/etcvialink_etc_dotfile.- Top-level shell files:
profile(env),bashrc/zshrc(interactive),shellrc(shared shell-agnostic settings),aliases.zprofileis a symlink toprofile. Zsh uses prezto.
base16-mocha is defined in many places independently (see README.md for the full list: colors, Xresources, alacritty, dunst, rofi, xmobar, xmonad.hs, nvim, spacemacs, dzen, i3lock). If you change colors, change them everywhere consistently — there is no central source.
xmonad-libs/{singlespacing,contexts,pseudotiling} are git submodules pointing at sibling repos (../xmonad-*). setup.sh's update path runs git submodule update --init --recursive after pulling.