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
parent
325c6def66
commit
da0d318022
|
|
@ -2,8 +2,8 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
|
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
|
||||||
|
|
||||||
log "Installing mail stack (isync, msmtp, notmuch, alot)..."
|
log "Installing mail stack (isync, msmtp, notmuch, alot, w3m)..."
|
||||||
sudo pacman -S --noconfirm --needed isync msmtp notmuch alot
|
sudo pacman -S --noconfirm --needed isync msmtp notmuch alot w3m
|
||||||
|
|
||||||
# ── Credentials ───────────────────────────────────────────────────────────────
|
# ── Credentials ───────────────────────────────────────────────────────────────
|
||||||
read -rp "Full name : " FULL_NAME
|
read -rp "Full name : " FULL_NAME
|
||||||
|
|
@ -110,6 +110,11 @@ with open(path, 'w') as f:
|
||||||
f.write(text)
|
f.write(text)
|
||||||
PYEOF
|
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 ───────────────────────────────────────────
|
# ── systemd timer for periodic sync ───────────────────────────────────────────
|
||||||
log "Installing mbsync systemd user timer (every 5 min)..."
|
log "Installing mbsync systemd user timer (every 5 min)..."
|
||||||
mkdir -p ~/.config/systemd/user
|
mkdir -p ~/.config/systemd/user
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue