From d1637e55b2bbc564a56fdbbaa22f45c14d8fc0c4 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Wed, 13 May 2026 13:43:15 +0100 Subject: feat(thunderbird): track non-private config in dotfiles Mirror the firefox/ pattern for Thunderbird: - thunderbird/user.js: telemetry off, safe-browsing off, remote images blocked, read receipts disabled, plain-text compose with flowed wrap at 72, vertical pane, calendar on Monday start - run_onchange_after_deploy-thunderbird.sh.tmpl: detects default profile and copies tracked files in on any change - meta/mail.txt: add thunderbird package (official repo) - .chezmoiignore: exclude thunderbird/ from $HOME deployment - README: mention Thunderbird + Bridge + Radicale stack Accounts/credentials/mailbox data stay local per profile. --- run_onchange_after_deploy-thunderbird.sh.tmpl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 run_onchange_after_deploy-thunderbird.sh.tmpl (limited to 'run_onchange_after_deploy-thunderbird.sh.tmpl') diff --git a/run_onchange_after_deploy-thunderbird.sh.tmpl b/run_onchange_after_deploy-thunderbird.sh.tmpl new file mode 100644 index 0000000..f19eae0 --- /dev/null +++ b/run_onchange_after_deploy-thunderbird.sh.tmpl @@ -0,0 +1,24 @@ +#!/bin/sh +# Deploy Thunderbird non-private configuration (user.js, optional chrome/). +# chezmoi re-runs this script whenever any file under thunderbird/ changes. +# thunderbird/ content hash: {{ output "sh" "-c" (printf "cd %q && find thunderbird -type f -exec sha256sum {} + | LC_ALL=C sort" .chezmoi.sourceDir) | sha256sum }} +set -eu + +PROFILES_DIR="$HOME/.thunderbird" +[ -d "$PROFILES_DIR" ] || exit 0 + +PROFILE=$(find "$PROFILES_DIR" -maxdepth 1 -mindepth 1 -type d -name '*.default-default' | head -1) +if [ -z "$PROFILE" ]; then + PROFILE=$(find "$PROFILES_DIR" -maxdepth 1 -mindepth 1 -type d -name '*.default*' | head -1) +fi +if [ -z "$PROFILE" ]; then + PROFILE=$(find "$PROFILES_DIR" -maxdepth 1 -mindepth 1 -type d | head -1) +fi +[ -n "$PROFILE" ] || exit 0 + +cd "$CHEZMOI_SOURCE_DIR" +find thunderbird -type f | while IFS= read -r src; do + dest="$PROFILE/${src#thunderbird/}" + mkdir -p "$(dirname "$dest")" + cp --remove-destination "$src" "$dest" +done -- cgit v1.3.1