From c4d0a95a81ac5db65a04824fd8e5b6089a36b376 Mon Sep 17 00:00:00 2001 From: Daniel Bauer Date: Tue, 11 Aug 2026 10:47:52 +0200 Subject: [PATCH] feat: remove difft --- CLAUDE.md | 6 +++--- dot_gitconfig.tmpl | 2 -- run_onchange_before_26_difftastic.sh | 23 ----------------------- 3 files changed, 3 insertions(+), 28 deletions(-) delete mode 100644 run_onchange_before_26_difftastic.sh diff --git a/CLAUDE.md b/CLAUDE.md index 63d9557..ac9e1c2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -33,12 +33,12 @@ There is no build, lint, or test suite — this is a config repo. "Testing" a ch ## Architecture -- **`run_onchange_before_NN_*.sh`** — idempotent setup scripts chezmoi re-runs whenever their content hash changes, in numeric order (`0` installs apt packages, `1` sets zsh as default shell and installs antidote, `20`+ install individual tools: fzf, diff-so-fancy, vim-plug, tmux plugin manager, lazygit, fonts, difftastic, nbdime). New machine-setup steps should follow this pattern: a numbered `run_onchange_before_*.sh` with `set -euo pipefail` and an existence check so re-runs are no-ops. +- **`run_onchange_before_NN_*.sh`** — idempotent setup scripts chezmoi re-runs whenever their content hash changes, in numeric order (`0` installs apt packages, `1` sets zsh as default shell and installs antidote, `20`+ install individual tools: fzf, diff-so-fancy, vim-plug, tmux plugin manager, lazygit, fonts, nbdime). New machine-setup steps should follow this pattern: a numbered `run_onchange_before_*.sh` with `set -euo pipefail` and an existence check so re-runs are no-ops. - **`.chezmoi.toml.tmpl`** — chezmoi's own config template; prompts once for `github_email` and enables `autoCommit`/`autoPush` on `chezmoi apply` (so applying on a configured machine also commits/pushes to this repo — be aware of that when testing changes there). - **`.commit_message.tmpl`** — template chezmoi uses to prompt for the commit message when autoCommit fires. - **Shell startup chain**: `dot_zshrc` sources `bin/term-background` (must run before the p10k instant-prompt block, since it reads the tty for OSC 11 background detection) → p10k instant prompt → `~/.environment`(`dot_environment`) + optional `~/.environment.local` → `~/.aliases` (`dot_aliases`) + optional `~/.aliases.local` → antidote plugin load (plugin list in `dot_zsh_plugins.txt`) → `~/.p10k.zsh`. The `.local` files are gitignored, host-specific overrides — never add machine-specific values directly to the tracked files. -- **`dot_gitconfig.tmpl`** — templated on `.github_email`; wires up diff-so-fancy/difftastic as pagers and nbdime for Jupyter notebook diffing. `~/.gitconfig.local` (untracked) is included for machine-specific overrides. +- **`dot_gitconfig.tmpl`** — templated on `.github_email`; wires up diff-so-fancy as the pager and nbdime for Jupyter notebook diffing. `~/.gitconfig.local` (untracked) is included for machine-specific overrides. - **`private_dot_config/`** → installs to `~/.config/` with restrictive permissions (nvim, matplotlib styles, fontconfig). - **`bin/`** → installs to `~/bin/`; `executable_term-background` detects terminal light/dark background via OSC 11 for theme-matching in nvim etc. -- **`.chezmoiignore`** lists source-repo-only paths (`README.md`, `.claude`, `.codex`, `.agents`) that chezmoi should never install to `$HOME`, plus a `machineClass`-gated conditional excluding `.ssh/config.d/home` and `.ssh/config.d/web` on any machine that isn't `machineClass = "private"`. +- **`.chezmoiignore`** lists source-repo-only paths (`README.md`, `.codex`, `.agents`, `CLAUDE.md`, `CLAUDE.local.md`, `key.txt.age`) that chezmoi should never install to `$HOME`, plus a `machineClass`-gated conditional excluding `.ssh/config.d/home`, `.ssh/config.d/web`, and `.claude/settings.json` on any machine that isn't `machineClass = "private"` — `~/.claude/settings.json` has no user-level `.local.json` merge mechanism, so machines with differing Claude Code config (e.g. `enabledPlugins`) manage that file by hand instead of via chezmoi. - **Age encryption**: `key.txt.age` (repo root) is an age private key encrypted with a passphrase.`run_onchange_before_02_decrypt-age-key.sh.tmpl` decrypts it into `~/.config/chezmoi/key.txt`. diff --git a/dot_gitconfig.tmpl b/dot_gitconfig.tmpl index 6cb3f7c..860e236 100644 --- a/dot_gitconfig.tmpl +++ b/dot_gitconfig.tmpl @@ -5,7 +5,6 @@ email = {{ .github_email | quote }} [core] pager = sh -c 'command -v diff-so-fancy >/dev/null && exec diff-so-fancy || less --tabs=4 -RX' - pager = less autocrlf = input attributesFile = {{ .chezmoi.homeDir }}/.gitattributes [alias] @@ -35,7 +34,6 @@ [diff] noprefix = true colorMoved = True - external = difft [commit] verbose = true [color "status"] diff --git a/run_onchange_before_26_difftastic.sh b/run_onchange_before_26_difftastic.sh deleted file mode 100644 index ed3a490..0000000 --- a/run_onchange_before_26_difftastic.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -INSTALL_DIR="${HOME}/.local/bin" -BINARY_NAME="difft" -TARBALL="difft-x86_64-unknown-linux-gnu.tar.gz" -DOWNLOAD_URL="https://github.com/Wilfred/difftastic/releases/latest/download/${TARBALL}" - -echo "Downloading difftastic..." -wget -q --show-progress -O "/tmp/${TARBALL}" "${DOWNLOAD_URL}" - -echo "Extracting..." -tar -xzf "/tmp/${TARBALL}" -C /tmp - -echo "Installing to ${INSTALL_DIR}..." -mv "/tmp/${BINARY_NAME}" "${INSTALL_DIR}/${BINARY_NAME}" -chmod +x "${INSTALL_DIR}/${BINARY_NAME}" - -echo "Cleaning up..." -rm -f "/tmp/${TARBALL}" - -echo "difftastic installed successfully!" -difft --version