omniflake/home/mail/bindings.neomuttrc
2025-11-11 17:18:26 +01:00

85 lines
4 KiB
Text

# Navigation
bind pager k previous-entry
bind pager j next-entry
# bind index,pager \Cu half-up
# bind index,pager \Cd half-down
# bind pager gg top
# bind index gg first-entry
# bind pager G bottom
# bind index G last-entry
# bind index,pager N search-opposite
bind index <return> display-message
bind index <space> collapse-thread
bind index,pager gf change-folder
# Read HTML
bind index,pager V noop
macro index,pager V "<view-attachments><search>html<enter><view-mailcap><exit>"
# compose
bind compose p postpone-message
bind compose P pgp-menu
# macro compose I "<attach-file>`tmpfile=$(mktemp -u --suffix .png -t XXXXXXXXXXXX -p ~/tmp) && wl-paste -t image/png > "$tmpfile" && echo "$tmpfile"`<enter>" "attach image from clipboard"
bind editor <Tab> complete-query
bind editor ^T complete
bind index,pager a group-reply
bind index,pager m noop
macro index,pager mar "<tag-pattern>new<enter><tag-prefix-cond><clear-flag>n<enter><tag-prefix-cond><clear-flag>*<enter>" "Mark all read"
# compose with signature management
macro index,pager @ "<enter-command>set signature=$my_signature<enter><compose-to-sender>" "Compose to sender"
macro index,pager c "<enter-command>set signature=$my_signature<enter><mail>" "Compose new message"
macro index,pager r "<enter-command>unset signature<enter><reply>" "Reply to message"
macro index,pager a "<enter-command>unset signature<enter><group-reply>" "Reply all"
macro index,pager f "<enter-command>unset signature<enter><forward-message>" "Forward message"
# moving messages
macro index,pager J ":set resolve=no\n<clear-flag>n:set resolve=yes\n<save-message>$my_junk<enter>" \
"Move to junk folder"
macro index,pager y ":set resolve=no\n<clear-flag>n:set resolve=yes\n<save-message>$mbox<enter>" \
"Move message to the archive"
macro index,pager I "<save-message>$spoolfile<enter>" "Move message to the inbox"
# switch folders
macro index,pager g! "<change-folder>$spoolfile<enter><refresh>" "Go to inbox"
macro index,pager gd "<change-folder>$postponed<enter><refresh>" "Go to drafts"
macro index,pager g< "<change-folder>$record<enter><refresh>" "Go to sent"
macro index,pager ga "<change-folder>$mbox<enter>" "Go to archive"
macro index,pager g> "<change-folder>$mbox<enter><refresh>" "Go to archive"
macro index,pager gt "<change-folder>$trash<enter><refresh>" "Go to trash"
macro index,pager gj "<change-folder>$my_junk<enter><refresh>" "Go to junk"
# accounts
macro index,pager gu "<change-folder>~/.local/share/mail/gu/Inbox<enter><refresh>" "Go to GU"
# macro index,pager gp "<change-folder>+systemli/IMAP/Inbox<enter><refresh>" "Go to Systemli"
macro index,pager gm "<change-folder>~/.local/share/mail/t9e/Inbox<enter><refresh>" "Go to t9e"
# macro index,pager gm "<change-folder>+gmail/IMAP/Inbox<enter><refresh>" "Go to Gmail"
macro index,pager gk "<change-folder>~/.local/share/mail/ksh/Inbox<enter><refresh>" "Go to KSH"
macro index,pager gi "<change-folder>~/.local/share/mail/ktiu/Inbox<enter><refresh>" "Go to ktiu"
# macro index,pager gf "<change-folder>~/.local/share/mail/dkg/Inbox<enter><refresh>" "Go to DKG"
macro index,pager L "<limit>all\n" "Show all messages (undo limit)"
# macro index,pager go "<shell-escape>mbsync -c ~/.config/mbsync/mbsyncrc $my_mbsync_acct && notmuch new &<enter>" \
# "Run mbsync to sync mail for this account"
macro index,pager go "<shell-escape>mbsync $my_mbsync_acct && notmuch new<enter>" \
macro index,pager g/ "<vfolder-from-query-readonly>" "find in nm"
macro index,pager A \
"<pipe-message>khard add-email --vcard-version=4.0<return>" \
"add the sender email address to khard"
macro index,pager S \
"<pipe-message> ripmime -i - -d ~/tmp && rm ~/tmp/textfile*" \
"save all non-text attachments using ripmime"
macro index,pager gb \
"<pipe-message> urlscan<enter>" \
"extract URLs out of a message"
macro index,pager gO \
"<shell-escape>mbsync -a && notmuch new<enter>" \
"run mbsync to sync all mail"