aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/run_onchange_after_deploy-thunderbird.sh.tmpl
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:15 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:15 +0100
commitd1637e55b2bbc564a56fdbbaa22f45c14d8fc0c4 (patch)
treeda324d8b2f8a351ce611e4ef9c3c917d94170283 /run_onchange_after_deploy-thunderbird.sh.tmpl
parent8d1b341bded481b1fa5cf28cf8d6a43bf01ba42a (diff)
downloaddotfiles-d1637e55b2bbc564a56fdbbaa22f45c14d8fc0c4.tar.gz
dotfiles-d1637e55b2bbc564a56fdbbaa22f45c14d8fc0c4.tar.bz2
dotfiles-d1637e55b2bbc564a56fdbbaa22f45c14d8fc0c4.zip
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.
Diffstat (limited to 'run_onchange_after_deploy-thunderbird.sh.tmpl')
-rw-r--r--run_onchange_after_deploy-thunderbird.sh.tmpl24
1 files changed, 24 insertions, 0 deletions
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