diff options
author | Toby Vincent <tobyv@tobyvin.dev> | 2023-07-11 22:52:10 -0500 |
---|---|---|
committer | Toby Vincent <tobyv@tobyvin.dev> | 2023-07-11 22:56:05 -0500 |
commit | d8cdb2f82ea6d6a87d8e15e0dcbbf6abfb4045ab (patch) | |
tree | e23e7d40be9d33b47c4f019f9c543d6dda5e0513 /aerc | |
parent | dbbb0951907ddcb907d8358c9e2f9ca99ea43555 (diff) |
feat(aerc): generate address book from maildir
Diffstat (limited to 'aerc')
-rw-r--r-- | aerc/.config/aerc/aerc.conf | 3 | ||||
-rw-r--r-- | aerc/.config/systemd/user/maildir-rank-addr.service | 9 | ||||
-rw-r--r-- | aerc/.config/systemd/user/maildir-rank-addr.timer | 9 |
3 files changed, 21 insertions, 0 deletions
diff --git a/aerc/.config/aerc/aerc.conf b/aerc/.config/aerc/aerc.conf index 0b08185..3f72bf4 100644 --- a/aerc/.config/aerc/aerc.conf +++ b/aerc/.config/aerc/aerc.conf @@ -33,6 +33,9 @@ message/rfc822 = wrap | colorize image/* = catimg -w$(tput cols) - .headers = colorize +[compose] +address-book-cmd="grep -iPm 100 --color=never %s /home/tobyv/.cache/maildir-rank-addr/addressbook.tsv" + [compose::review] <C-r> = :choose \ -o a approved "header X-Sourcehut-Patchset-Update APPROVED" \ diff --git a/aerc/.config/systemd/user/maildir-rank-addr.service b/aerc/.config/systemd/user/maildir-rank-addr.service new file mode 100644 index 0000000..b9fcf24 --- /dev/null +++ b/aerc/.config/systemd/user/maildir-rank-addr.service @@ -0,0 +1,9 @@ +[Unit] +Description=Generates a ranked addressbook from a maildir folder + +[Service] +Type=oneshot +ExecStart=/usr/bin/maildir-rank-addr --maildir=${MAIL} --addresses="tobyv@tobyvin.dev,tobyv13@gmail.com" --template='{{.Address}}\t{{.Name}}\t{{.NormalizedName}}' + +[Install] +WantedBy=default.target diff --git a/aerc/.config/systemd/user/maildir-rank-addr.timer b/aerc/.config/systemd/user/maildir-rank-addr.timer new file mode 100644 index 0000000..24c6b7e --- /dev/null +++ b/aerc/.config/systemd/user/maildir-rank-addr.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Addressbook generation timer + +[Timer] +OnUnitActiveSec=12h +Unit=maildir-rank-addr.service + +[Install] +WantedBy=timers.target |