dotfiles/mail/.config/neomutt/maps
Marty Oehme a99982028e
mail: Update to new neomutt structure
Updated notmuch to only be available for full-text search. Removed
complete afew configuration.

Added msmtp as mail sending agent.

Added structured neomutt configuration with custom bindings, built for
my personal gmail account, without any plaintext passwords revealed,
etc.

This is a reasonably well working mail setup,
which should provide a stable starting point for further refinements.

Additionally, added some functionality to `mail-check` script:
Allowed user to choose sync target for each run, by
passing in mbsync target (group/channel/..) as the argument.
Also, allows setting password file to use for script through env var,
and made imapfilter location less hard-coded to my system.
2021-11-23 16:09:32 +01:00

60 lines
2.3 KiB
Plaintext

# index navigation
bind index l display-message
bind index L limit
bind index,pager g noop # don't send group-replies with g
bind index gg first-entry
bind index G last-entry
bind index <space> collapse-thread
bind index,pager \CF next-page
bind index,pager \CB previous-page
bind index,pager N search-opposite # vim-like search
bind index s toggle-new
macro index \CS "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
# Email completion bindings
bind editor <Tab> complete-query
bind editor ^T complete
# Press A to add contact to Khard address book
macro index,pager A \
"<pipe-message>khard add-email<return>" \
"add the sender email address to khard"
# mailbox navigation
macro index,pager gi "<change-folder>=inbox<enter>" "go to inbox"
macro index,pager gm "<change-folder>=important<enter>" "go to important"
macro index,pager gs "<change-folder>=sent<enter>" "go to sent"
macro index,pager gd "<change-folder>=drafts<enter>" "go to drafts"
macro index,pager gt "<change-folder>=trash<enter>" "go to trash"
macro index,pager ga "<change-folder>=archive<enter>" "go to archive"
# sidebar navigation
bind index,pager B sidebar-toggle-visible
bind index,pager <down> sidebar-next
bind index,pager <up> sidebar-prev
bind index,pager <right> sidebar-open
# search navigation
macro index a "<limit>all\n" "show all messages (undo limit)"
# notmuch search navigation
bind index \\ vfolder-from-query # notmuch search
# pager navigation
bind pager,attach h exit
bind pager l view-attachments
bind pager k previous-line
bind pager j next-line
bind pager gg top
bind pager G bottom
# compose postpone
bind compose p postpone-message
# since we unbound the original g
bind index,pager R group-reply
# open urls found in the e-mail
macro index,pager \CU "|urlview<enter>" "call urlview to open links"
# Refresh far imap email
macro index O "<sync-mailbox><shell-escape>export MBSYNC_PRE=true; mail-check<enter><sync-mailbox>" "refresh all e-mail"
macro index o "<sync-mailbox><shell-escape>export MBSYNC_PRE=true; mail-check gmail-inbox<enter><sync-mailbox>" "refresh inbox e-mail"
# Saner copy/move dialogs
macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"