feat(mail): install w3m and write mailcap for HTML email rendering

Adds w3m to the install list and appends the text/html mailcap entry
so alot renders HTML emails as plain text via w3m -dump.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
Amir Alexander Abdelbaki 2026-05-26 16:07:54 +02:00
parent 325c6def66
commit da0d318022
1 changed files with 7 additions and 2 deletions

View File

@ -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