From 022dc742bb9188205c0e95f6f8a6a86773a5d3b4 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Mon, 1 Jan 2024 17:05:38 +0100 Subject: [PATCH] add khard tips to neomutt --- docs/neomutt.md | 18 +++++++++++++++--- docs/nextcloud.md | 11 +++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 docs/nextcloud.md diff --git a/docs/neomutt.md b/docs/neomutt.md index 9d8ffeb..3e999f1 100644 --- a/docs/neomutt.md +++ b/docs/neomutt.md @@ -1,5 +1,6 @@ # Neomutt + ## Markdown to HTML rendering To write more normie-friendly emails, non-plain-text emails are probably better. For this, a conversion from Markdown to HTML with Mathjax support seems best. @@ -12,7 +13,7 @@ Ensure `pandoc` is installed. (`which pandoc || sudo pacman -S pandoc`) Add to your muttrc (either in `~/.mutt/muttrc` or `~/.config/mutt/muttrc`. From now on assuming `~/.config/mutt` as config folder) -``` +```muttrc macro compose m \ "set pipe_decode\ pandoc -f gfm -t plain -o /tmp/msg.txt\ @@ -77,7 +78,7 @@ Create a second macro for which you use a different template, that excludes the This way you can create smaller emails with pure markdown syntax and when necessary can send mathematical formulas, resulting in larger mails. For this add the following to the muttrc: -``` +```muttrc macro compose l \ "set pipe_decode\ pandoc -f gfm -t plain -o /tmp/msg.txt\ @@ -117,8 +118,19 @@ $endfor$ ``` +## Khard Adress Book integration +Sadly, khard does not have a great TUI as abook, but it benefits from being able to sync with CardDav servers like Nextcloud. -### Usage with abook +For seamless integration such as adding emails and autocompleting from the address book, add the following to your muttrc (either in `~/.mutt/muttrc` or `~/.config/mutt/muttrc`. From now on assuming `~/.config/mutt` as config folder) +```muttrc +set query_command = "echo %s | xargs khard email --parsable --" +macro index,pager a \ + "khard add-email" \ + "add the sender email address to khard" +``` +For syncing with CardDav servers like Nextcloud look into [NextCloud](./nextcloud.md). + +## abook Adress Book integration Add the following to the muttrc. The first line set the default query to use abook, while the second line allows us to quickly add the sender of a mail that we currently read to the adress book using `A`. diff --git a/docs/nextcloud.md b/docs/nextcloud.md new file mode 100644 index 0000000..884d61a --- /dev/null +++ b/docs/nextcloud.md @@ -0,0 +1,11 @@ +#Nextcloud +## Setup a drop-off folder in Nextcloud + + +## Sync contacts with khard +TODO + +See [neomutt.md](./neomutt.md) for more details on how to use khard with neomutt for autocompletion. + +## Sync Calendar with Calcurse +TODO