Add: wrapper script to run mbsync everytime mutt is started

This commit is contained in:
hyzen
2026-02-10 12:23:09 +05:30
parent dbaf0414b2
commit db449a969b

View File

@@ -791,6 +791,24 @@ fi
mv "${mutt_config}.tmp" "$mutt_config"
# -------------------------------------------------------
# Create/update neomutt wrapper script
# -------------------------------------------------------
wrapper_script="$HOME/.local/bin/neomutt"
mkdir -p "$HOME/.local/bin"
# Collect all configured email addresses from mbsyncrc channels
# Each "Channel <email>" line in .mbsyncrc is one account to sync
cat > "$wrapper_script" << 'WRAPPER_EOF'
#!/bin/bash
mbsync -q -a &
exec /usr/bin/neomutt
WRAPPER_EOF
chmod +x "$wrapper_script"
echo "Created wrapper script: $wrapper_script"
echo "(make sure ~/.local/bin is in your PATH)"
echo
echo "=== Setup Complete ==="
echo "Account: $email"