aboutsummaryrefslogtreecommitdiffstats
path: root/.config/mutt/macros.rc
blob: 387d7e33f31a27c1927ff1840ab9a251292512eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# source folder settings and enter folder
macro index,pager <F2> '<sync-mailbox><enter-command>source .config/mutt/dave@sleepmap.de.rc<enter><change-folder>!<enter>'
macro index,pager <F3> '<sync-mailbox><enter-command>source .config/mutt/dvzrv@archlinux.org.rc<enter><change-folder>!<enter>'

macro attach W \
  "<save-entry><bol>~/Downloads/<eol>" \
  "Save attachment to ~/Downloads."

macro index D \
  "<tag-prefix><save-message>+Trash<enter>" \
  "Move message to Trash"

macro index S \
  "<tag-prefix><save-message>+Spam<enter>"  \
  "Move message to Spam."

macro index I \
  "<tag-prefix><save-message>=Archives/INBOX/2020<enter><sync-mailbox>" \
  "Archive tagged INBOX message(s) in Archives.INBOX.2020"

macro index G \
  "<tag-prefix><save-message>=Archives/Sent/2020<enter><sync-mailbox>" \
  "Archive tagged Sent message(s) in Archives.Sent.2020"

macro index,pager A \
  "<pipe-message>khard add-email<return>" \
  "Add the sender email address to khard"

macro index <F8> \
  "<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
  <shell-escape>notmuch-mutt -r --prompt search<enter>\
  <change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\
  <enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \
  "notmuch: search mail"

macro index <F9> \
  "<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
  <pipe-message>notmuch-mutt -r thread<enter>\
  <change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\
  <enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \
  "notmuch: reconstruct thread"

macro index <F6> \
  "<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
  <pipe-message>notmuch-mutt tag -- -inbox<enter>\
  <enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \
  "notmuch: remove message from inbox"

# vi: ft=muttrc