mail by index

This commit is contained in:
Till 2026-02-16 01:41:59 +01:00
parent f7fd3a7fe9
commit 8099faa9ae
3 changed files with 186 additions and 231 deletions

View file

@ -1,52 +1,5 @@
# Navigation
bind pager k previous-entry
bind pager j next-entry
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>" "View as HTML"
# 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 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"
macro index,pager l "<enter-command>unset signature<enter><list-reply>" "List reply"
# 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"
macro index,pager y ":set resolve=no\n<clear-flag>n:set resolve=yes\n<save-message>$mbox<enter>" "Move to archive"
macro index,pager I "<save-message>$spoolfile<enter>" "Move to 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 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 gm "<change-folder>~/.local/share/mail/t9e/Inbox<enter><refresh>" "Go to t9e"
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 L "<limit>all\n" "Show all messages (undo limit)"
macro index,pager go "<shell-escape>mbsync $my_account && notmuch new<enter>" "Sync this account"
macro index,pager gO "<shell-escape>mbsync -a && notmuch new<enter>" "Sync all accounts"
@ -61,8 +14,3 @@ macro index,pager /d "<vfolder-from-query-readonly>folder:+$my_account/$my_nm_po
macro index,pager /t "<vfolder-from-query-readonly>folder:+$my_account/$my_nm_trash" "Find in trash"
macro index,pager /j "<vfolder-from-query-readonly>folder:+$my_account/$my_nm_junk" "Find in junk"
macro index,pager A "<pipe-message>khard add-email --vcard-version=4.0<return>" "Add sender to khard"
macro index,pager S "<pipe-message> ripmime -i - -d ~/tmp && rm ~/tmp/textfile*" "Save all attachments"
macro index,pager gb "<pipe-message> urlscan<enter>" "Extract URLs"