Browse Source

Shortcut to archive email

If an archive mailbox is found during redetected mailboxes,
"<backspace>a" will be used as shortcut to save-message to
this mailbox and automatically accept the append notification.

To use <backspace> its macro is set to noop in the
autoconf/mutt_profile.
pull/104/head
Adrian Roth 6 years ago
parent
commit
56d680efdf
2 changed files with 9 additions and 1 deletions
  1. +1
    -0
      autoconf/mutt_profile
  2. +8
    -1
      mutt-wizard.sh

+ 1
- 0
autoconf/mutt_profile View File

@@ -18,4 +18,5 @@ set ssl_force_tls = yes
bind index,pager gg noop
bind index,pager g noop
bind index gg first-entry
bind index,pager <Backspace> noop
unmailboxes *

+ 8
- 1
mutt-wizard.sh View File

@@ -64,6 +64,11 @@ formatShortcut() { \
echo "macro index,pager g$1 \"<change-folder>$data<enter>\" \"Go to $2.\"" >> "$muttdir"/accounts/$3.muttrc
done ;}

formatMoveEmailShortcut() { \
while read data; do
echo "macro index,pager <Backspace>$1 \"<save-message>$data<enter><enter>\" \"Save message to $2.\"" >> "$muttdir"/accounts/$3.muttrc
done ;}

gen_delim() { \
delim="="
for i in `seq $(( $1 - 1 ))`
@@ -87,7 +92,9 @@ detectMailboxes() { \
grep -i /tmp/$1_boxes -e trash | sed 1q | formatShortcut t trash $1
grep -i /tmp/$1_boxes -e spam | sed 1q | formatShortcut S spam $1
grep -i /tmp/$1_boxes -e junk | sed 1q | formatShortcut j junk $1
grep -i /tmp/$1_boxes -e archive | sed 1q | formatShortcut a archive $1
archive_box=$(grep -i /tmp/$1_boxes -e archive | sed 1q)
echo $archive_box | formatShortcut a archive $1
echo $archive_box | formatMoveEmailShortcut a archive $1
spoolfile=$(grep -i /tmp/$1_boxes -e inbox | sed -e 's/=/+/g' | sed 1q)
record=$(grep -i /tmp/$1_boxes -e sent | sed -e 's/=/+/g' | sed 1q)
postponed=$(grep -i /tmp/$1_boxes -e draft | sed -e 's/=/+/g' | sed 1q)


Loading…
Cancel
Save