# dotfiles My personal machine configuration. The working tree is `$HOME` itself, so this repository *is* the home directory — each branch targets a specific environment (OS, distribution, desktop), and only the tracked files belong to it. The bare-repo-in-`$HOME` approach is inspired by [this Atlassian tutorial][0]. The active branch is `kde`: Manjaro Linux, KDE Plasma on Wayland, [foot][1] + [tmux][2], [bash][3], [nvim][4] built from source, [pass][5]. ## Layout The work tree is `$HOME` — there is **no `.git/` in the home directory**, the user chooses where the git dir lives. Because `$HOME` is full of untracked noise (`Downloads/`, `.cache/`, `Projects/`, …), `status.showUntrackedFiles` is set to `no` so `git status` stays readable; use `git ls-files` to see what is actually tracked. To bootstrap from scratch: ```bash git init --bare "$DOTFILES_DIR" export GIT_DIR="$DOTFILES_DIR" GIT_WORK_TREE="$HOME" git config --local status.showUntrackedFiles no git config --local core.bare false ``` Then track files one at a time — `git add ~/.bashrc` — and never `git add -A` (it would try to stage the entire home directory). ## The `dotfiles` helper `GIT_DIR` and `GIT_WORK_TREE` are deliberately **not** exported at login; only `DOTFILES_DIR` is, via `~/.config/environment.d/50-user.conf`. `~/.local/bin/dotfiles` is the entry point: - **`dotfiles on` / `dotfiles off`** copy a `source …` line to the Wayland clipboard that exports (or unsets) the git variables in the current shell — a script can't mutate its parent's environment, so you paste the line to toggle one shell. - **`dotfiles sync`** runs the whole non-interactive setup: Arch/AUR packages via `yay`, XDG user dirs, Python tools via `pipx`, a from-source Neovim build when a newer release tag is available, Proton VPN, the `keyd` service, and the Claude Code binary. - **`dotfiles claude-adopt-project`** creates or adopts the Claude store for the current directory and wires its `.claude` symlink (the interactive half of the Claude `Setup` hook). There is also a dedicated `tmux-dotfiles` launcher (and its `.desktop` entry) that opens a foot/tmux session with the git environment already on. Its sibling `tmux-notes` opens Neovim on the notes directory (`~/Notes`, via `+NotesOpen`) in a dedicated foot/tmux "Notes" session. ## Stack - **Shell** — [bash][3] - **Terminal** — [foot][1] (Wayland) - **Multiplexer** — [tmux][2] - **Editor** — [Neovim][4], built from source - **File browser** — [ranger][6] - **Password manager** — [pass][5] - **Keyboard remapping** — [keyd][7] - **Claude Code** — `claude-config` submodule (`.config/claude`) ## Links [0]: https://www.atlassian.com/git/tutorials/dotfiles [1]: https://codeberg.org/dnkl/foot#index [2]: https://github.com/tmux/tmux/wiki [3]: https://www.gnu.org/software/bash/ [4]: https://neovim.io/ [5]: https://www.passwordstore.org/ [6]: https://ranger.github.io/ [7]: https://github.com/rvaiya/keyd