diff --git a/bin/mailsync b/bin/mailsync index 854a4ba..b6be42f 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -18,7 +18,9 @@ echo " 🔃" > /tmp/imapsyncicon pkill -RTMIN+12 i3blocks # Run mbsync. You can feed this script different settings. -mbsync -a "$@" +accounts=$(ls "$HOME/.local/share/mail" | grep """$@") +echo "$accounts" | xargs --max-procs=4 -n 1 -I account mbsync -V account + rm -f /tmp/imapsyncicon pkill -RTMIN+12 i3blocks diff --git a/bin/mw b/bin/mw index 1ddd164..4ec5747 100755 --- a/bin/mw +++ b/bin/mw @@ -78,7 +78,7 @@ bind index,pager g noop bind index,pager M noop bind index,pager C noop bind index gg first-entry -macro index o \"mailsync -V $title\" \"run mbsync to sync $title\" +macro index o \"mailsync $title\" \"run mbsync to sync $title\" unmailboxes * " else diff --git a/mutt-wizard.muttrc b/mutt-wizard.muttrc index c8b7b59..8100f38 100644 --- a/mutt-wizard.muttrc +++ b/mutt-wizard.muttrc @@ -60,7 +60,7 @@ bind editor complete-query macro index,pager a "|abook --add-email\n" 'add sender to abook' macro index \Cr "T~UN." "mark all messages as read" -macro index O "mailsync -Va" "run offlineimap to sync all mail" +macro index O "mailsync" "run offlineimap to sync all mail" macro index \Cf "unset wait_keyread -p 'Enter a search term to find with notmuch: ' x; echo \$x >~/.cache/mutt_terms~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;chomp@a;s/\^id:// for@a;$,=\"|\";print@a'\`\"" "show only messages matching a notmuch pattern" macro index A "all\n" "show all messages (undo limit)"