diff --git a/setup/modules/optional-Modules/apps/mail-notmuch.sh b/setup/modules/optional-Modules/apps/mail-notmuch.sh index 2827c58..1461987 100755 --- a/setup/modules/optional-Modules/apps/mail-notmuch.sh +++ b/setup/modules/optional-Modules/apps/mail-notmuch.sh @@ -2,8 +2,8 @@ set -euo pipefail source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh" -log "Installing mail stack (isync, msmtp, notmuch, alot)..." -sudo pacman -S --noconfirm --needed isync msmtp notmuch alot +log "Installing mail stack (isync, msmtp, notmuch, alot, w3m)..." +sudo pacman -S --noconfirm --needed isync msmtp notmuch alot w3m # ── Credentials ─────────────────────────────────────────────────────────────── read -rp "Full name : " FULL_NAME @@ -110,6 +110,11 @@ with open(path, 'w') as f: f.write(text) PYEOF +# ── mailcap (HTML email rendering via w3m) ──────────────────────────────────── +log "Writing ~/.mailcap..." +grep -qxF "text/html; w3m -dump -o document_charset=%{charset} '%s'; nametemplate=%s.html; copiousoutput" ~/.mailcap 2>/dev/null \ + || echo "text/html; w3m -dump -o document_charset=%{charset} '%s'; nametemplate=%s.html; copiousoutput" >> ~/.mailcap + # ── systemd timer for periodic sync ─────────────────────────────────────────── log "Installing mbsync systemd user timer (every 5 min)..." mkdir -p ~/.config/systemd/user