diff options
author | Joe <bousset.rudy@gmail.com> | 2022-07-06 12:31:06 +0200 |
---|---|---|
committer | Joe <bousset.rudy@gmail.com> | 2022-07-06 12:31:06 +0200 |
commit | aa5bcb518d4f6b25e4ebe3f1f59fee74b9ab327f (patch) | |
tree | c6cc61474695abaec446b1780c92899d61290fde | |
parent | update (diff) | |
download | dotfiles-bsd-aa5bcb518d4f6b25e4ebe3f1f59fee74b9ab327f.tar.gz dotfiles-bsd-aa5bcb518d4f6b25e4ebe3f1f59fee74b9ab327f.tar.bz2 dotfiles-bsd-aa5bcb518d4f6b25e4ebe3f1f59fee74b9ab327f.tar.xz dotfiles-bsd-aa5bcb518d4f6b25e4ebe3f1f59fee74b9ab327f.tar.zst dotfiles-bsd-aa5bcb518d4f6b25e4ebe3f1f59fee74b9ab327f.zip |
Update
-rw-r--r-- | .config/msmtp/config | 7 | ||||
-rw-r--r-- | .config/mutt/defaults.muttrc | 5 | ||||
-rwxr-xr-x | .local/bin/mutt_md2html.sh | 25 |
3 files changed, 29 insertions, 8 deletions
diff --git a/.config/msmtp/config b/.config/msmtp/config index 122c010..4b6d4fe 100644 --- a/.config/msmtp/config +++ b/.config/msmtp/config @@ -31,10 +31,3 @@ account rbousset@secuserve.com from rbousset@secuserve.com user rbousset@secuserve.com passwordeval "pass show mutt/rbousset@secuserve.com" - -account diff-mx@secuserve.com - host next.optimails.com - port 587 - from diff-mx@secuserve.com - user diff-mx@secuserve.com - passwordeval "pass show secuserve/diffmx___diff-mx@secuserve.com" diff --git a/.config/mutt/defaults.muttrc b/.config/mutt/defaults.muttrc index 6b05b79..3d1db91 100644 --- a/.config/mutt/defaults.muttrc +++ b/.config/mutt/defaults.muttrc @@ -68,13 +68,16 @@ bind editor <Tab> complete-query #set crypt_autosign = yes #set crypt_opportunistic_encrypt = yes #set pgp_self_encrypt = yes -#set pgp_default_key = 'your@gpgemailaddre.ss' +set pgp_default_key = 'bousset.rudy@gmail.com' macro index,pager a "<enter-command>set my_pipe_decode=\$pipe_decode pipe_decode<return><pipe-message>abook -C $XDG_CONFIG_HOME/abook/abookrc --datafile $XDG_DATA_HOME/abook/addressbook --add-email<return><enter-command>set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<return>" "add the sender address to abook" macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read" macro index O "<shell-escape>mbsync -c /usr/home/jozan/.config/mbsync/mbsyncrc -a<enter>" "run mbsync to sync all mail" macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>printf 'Enter a search term to find with notmuch: '; read x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"<enter>" "show only messages matching a notmuch pattern" macro index A "<limit>all\n" "show all messages (undo limit)" +macro compose Y "<first-entry>\ +<pipe-entry>mutt_md2html.sh<enter>\ +<enter-command>source /tmp/neomutt-attach-macro<enter>" # Sidebar mappings set sidebar_visible = yes diff --git a/.local/bin/mutt_md2html.sh b/.local/bin/mutt_md2html.sh new file mode 100755 index 0000000..0756ea7 --- /dev/null +++ b/.local/bin/mutt_md2html.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +commandsFile="/tmp/neomutt-commands" +markdownFile="/tmp/neomutt-markdown" +htmlFile="/tmp/neomutt.html" + +cat - > "$markdownFile" +echo -n "push " > "$commandsFile" + +pandoc -f markdown -t html5 --standalone "$markdownFile" > "$htmlFile" + +# Attach the html file +echo -n "<attach-file>\"$htmlFile\"<enter>" >> "$commandsFile" + +# Set it as inline +echo -n "<toggle-disposition>" >> "$commandsFile" + +# Tell neomutt to delete it after sending +echo -n "<toggle-unlink>" >> "$commandsFile" + +# Select both the html and markdown files +echo -n "<tag-entry><previous-entry><tag-entry>" >> "$commandsFile" + +# Group the selected messages as alternatives +echo -n "<group-alternatives>" >> "$commandsFile" |