diff --git a/dotfiles/mail.org b/dotfiles/mail.org index a74e501..08357e0 100644 --- a/dotfiles/mail.org +++ b/dotfiles/mail.org @@ -390,7 +390,7 @@ Rajouter les keybindings de vim https://github.com/neomutt/neomutt/issues/56#iss bind pager \005 next-line # Mouse wheel #+END_SRC -*** TODO Contacts +*** TODO [#A] Contacts #+BEGIN_SRC conf macro pager \Ca " goobook add" "add the sender address to Google contacts" #+END_SRC @@ -399,6 +399,13 @@ Rajouter les keybindings de vim https://github.com/neomutt/neomutt/issues/56#iss #+BEGIN_SRC conf bind compose p postpone-message + bind compose R rename-attachment + + bind compose a attach-file +#+END_SRC + +Use =urlview= to extract urls from the mail. +#+begin_src conf macro attach,compose \cw "\ :set my_tmp_pipe_decode=\$pipe_decode\n\ :set pipe_decode\n\ @@ -406,11 +413,7 @@ Rajouter les keybindings de vim https://github.com/neomutt/neomutt/issues/56#iss :set pipe_decode=\$my_tmp_pipe_decode\n\ :unset my_tmp_pipe_decode\n" \ 'call urlview to extract URLs out of a message' - - bind compose R rename-attachment - - bind compose a attach-file -#+END_SRC +#+end_src **** TODO - Write html emails using markdown #+BEGIN_SRC conf @@ -422,7 +425,7 @@ Rajouter les keybindings de vim https://github.com/neomutt/neomutt/issues/56#iss macro compose M "termite -e \"neomutt -R\"" #+END_SRC -*** TODO Sidebar +*** TODO [#A] Sidebar #+BEGIN_SRC conf bind index,pager \Ck sidebar-prev bind index,pager \Cj sidebar-next @@ -909,10 +912,9 @@ This empty code block is used to add a new line after signatude unset move #+END_SRC -** TODO [#A] Use Vim to compose email, with a few default options. -- [ ] Add Goyo by default and when closing it, close vim at the same time +** Use Vim to compose email, with a few default options. #+BEGIN_SRC conf -set editor = "nvim -c '/\\n--' -c ':noh' -c 'startinsert'" +set editor = "nvim -c '/\\n--' -c ':noh' -c 'startinsert' -c ':Goyo'" #+END_SRC ** Basic Options @@ -1014,33 +1016,46 @@ set editor = "nvim -c '/\\n--' -c ':noh' -c 'startinsert'" ** TODO Integration with org-mode https://www.donarmstrong.com/posts/org_mode_mutt_capture/ https://upsilon.cc/~zack/blog/posts/2010/02/integrating_Mutt_with_Org-mode/ + ** TODO Send HTML mails using Markdown https://unix.stackexchange.com/questions/108485/send-email-written-in-markdown-using-mutt/424162 https://github.com/Roguelazer/muttdown -** TODO Attachments +** TODO [#A] Attachments +*** Open Attachments + :PROPERTIES: + :header-args: :tangle ~/scripts/openfile.sh + :header-args+: :comments both :mkdirp yes + :header-args+: :shebang "#!/usr/bin/env bash" + :END: +A script is used to open the attachment with the default application: +*it seems this script is not use at the moment* +#+begin_src bash + base=$(basename "$1") + ext="${base##*.}" + + file=$(mktemp -u --suffix=".$ext") + + rm -f "$file" + + cp "$1" "$file" + + setsid xdg-open "$file" >/dev/null 2>&1 & +#+end_src + *** Attach multiple files at once First, tag the files you want to send using =t=, then =;= to apply the action on all tagged files and finally == to add them all. + *** Forgotten Attachment #+begin_src conf set abort_noattach = ask-yes set abort_noattach_regex = "\\<(attach(|ed|ments?)|(attaché|attachés|attache|attachons|joint|jointe|joints|jointes|joins|joignons))\\>" #+end_src -*** TODO Attach file using GUI File Manager +*** TODO [#B] Attach file using GUI File Manager #+BEGIN_SRC conf # macro compose A "bash $HOME/.config/neomut/bin/attach-file.shsource /tmp/muttpick" "Attach with GUI" #+END_SRC -*** Cheatsheet -| Command | Usage | -|---------+---------------| -| == | Open the file | - -** TODO Open Url from mail -#+BEGIN_SRC bash -yay -S urlview -#+END_SRC - ** TODO View emails while composing https://wiki.archlinux.org/index.php/Mutt#Display_another_email_while_composing