Description: Fallback to mutt if ~/.muttrc exists. Author: Per Olofsson --- a/scripts/xdg-email.in +++ b/scripts/xdg-email.in @@ -426,6 +426,16 @@ if [ x"$DE" = x"" ]; then DE=generic fi +if [ "$DE" = generic ] && [ -z "$MAILER" ] && \ + ( [ -r ~/.muttrc ] || [ -r ~/.mutt/muttrc ] ) && \ + which mutt >/dev/null 2>&1; then + if [ -n "$DISPLAY" ]; then + MAILER="x-terminal-emulator -e mutt" + else + MAILER=mutt + fi +fi + if [ x"$MAILER" != x"" ]; then DE=envvar fi