dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 0ce7abd41626475434ceef567129921d03917bc3
parent b83530c4cdb4c1a60bfbec8cbcc1e37f861710e0
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Thu,  5 Nov 2020 15:52:18 +0100

mutt: fix macros for differently named mailboxes

Former-commit-id: 6e9374376f5ce1a33d5f26d49bb4d5ba5f494d07
Diffstat:
Mmutt/muttrc | 40++++++++++------------------------------
Mmutt/personal | 21+++++++++++++++++++++
Mmutt/school | 21+++++++++++++++++++++
3 files changed, 52 insertions(+), 30 deletions(-)

diff --git a/mutt/muttrc b/mutt/muttrc @@ -7,15 +7,6 @@ set mail_check=0 # minimum time between scans unset mark_old # it's enough to see whats unread set mailcap_path = ~/.config/mutt/mailcap -bind index,pager i noop -source school -folder-hook $folder 'source ~/.config/mutt/school' -macro index,pager is '<sync-mailbox><enter-command>source ~/.config/mutt/school<enter><change-folder>!<enter>;<check-stats>' "switch to school" - -source personal -folder-hook $folder 'source ~/.config/mutt/personal' -macro index,pager ip '<sync-mailbox><enter-command>source ~/.config/mutt/personal<enter><change-folder>!<enter>;<check-stats>' "switch to personal" - set pgp_default_key = 0x67A9DD9A68AE0B7C set crypt_autosign set crypt_verify_sig @@ -129,25 +120,14 @@ bind index,pager M noop bind index,pager C noop bind index,pager N search-opposite macro index a "<limit>all<enter>" -macro index,pager A "<save-message>=Archive<enter>" "move mail to Archive" -macro index,pager gi "<change-folder>=Inbox<enter>" "go to Inbox" -macro index,pager ga "<change-folder>=Archive<enter>" "go to Archive" -macro index,pager gd "<change-folder>=Drafts<enter>" "go to Drafts" -macro index,pager gj "<change-folder>=Spam<enter>" "go to Spam" -macro index,pager gt "<change-folder>=Trash<enter>" "go to Trash" -macro index,pager gs "<change-folder>=Sent<enter>" "go to Sent" -macro index,pager MI "<save-message>=Inbox<enter>" "move mail to Inbox" -macro index,pager MA "<save-message>=Archive<enter>" "move mail to Archive" -macro index,pager MD "<save-message>=Drafts<enter>" "move mail to Drafts" -macro index,pager MJ "<save-message>=Spam<enter>" "move mail to Spam" -macro index,pager MT "<save-message>=Trash<enter>" "move mail to Trash" -macro index,pager MS "<save-message>=Sent<enter>" "move mail to Sent" -macro index,pager MM "<save-message>?<toggle-mailboxes>" "move a message to a mailbox" -macro index,pager CI "<copy-message>=Inbox<enter>" "copy mail to Inbox" -macro index,pager CA "<copy-message>=Archive<enter>" "copy mail to Archive" -macro index,pager CD "<copy-message>=Drafts<enter>" "copy mail to Drafts" -macro index,pager CJ "<copy-message>=Spam<enter>" "copy mail to Spam" -macro index,pager CT "<copy-message>=Trash<enter>" "copy mail to Trash" -macro index,pager CS "<copy-message>=Sent<enter>" "copy mail to Sent" -macro index,pager CC "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox" macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>printf 'Enter a search term to find with notmuch: '; read x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"<enter>" "show only messages matching a notmuch pattern" + +bind index,pager i noop +source school +folder-hook $folder 'source ~/.config/mutt/school' +macro index,pager is '<sync-mailbox><enter-command>source ~/.config/mutt/school<enter><change-folder>!<enter>;<check-stats>' "switch to school" + +source personal +folder-hook $folder 'source ~/.config/mutt/personal' +macro index,pager ip '<sync-mailbox><enter-command>source ~/.config/mutt/personal<enter><change-folder>!<enter>;<check-stats>' "switch to personal" + diff --git a/mutt/personal b/mutt/personal @@ -29,3 +29,24 @@ account-hook $folder "set imap_user=$my_personal_email imap_pass=$my_personal_pa macro index O "<shell-escape>mbsync -c ~/.config/mbsync/mbsyncrc $my_personal_email<enter>" "run mbsync to sync $my_personal_email" macro index o "<shell-escape>mbsync -c ~/.config/mbsync/mbsyncrc $my_personal_email:Inbox,Sent<enter>" "run mbsync to sync all mail" +macro index,pager A "<save-message>=Archive<enter>" "move mail to Archive" +macro index,pager gi "<change-folder>=Inbox<enter>" "go to Inbox" +macro index,pager ga "<change-folder>=Archive<enter>" "go to Archive" +macro index,pager gd "<change-folder>=Drafts<enter>" "go to Drafts" +macro index,pager gj "<change-folder>=Spam<enter>" "go to Spam" +macro index,pager gt "<change-folder>=Trash<enter>" "go to Trash" +macro index,pager gs "<change-folder>=Sent<enter>" "go to Sent" +macro index,pager MI "<save-message>=Inbox<enter>" "move mail to Inbox" +macro index,pager MA "<save-message>=Archive<enter>" "move mail to Archive" +macro index,pager MD "<save-message>=Drafts<enter>" "move mail to Drafts" +macro index,pager MJ "<save-message>=Spam<enter>" "move mail to Spam" +macro index,pager MT "<save-message>=Trash<enter>" "move mail to Trash" +macro index,pager MS "<save-message>=Sent<enter>" "move mail to Sent" +macro index,pager MM "<save-message>?<toggle-mailboxes>" "move a message to a mailbox" +macro index,pager CI "<copy-message>=Inbox<enter>" "copy mail to Inbox" +macro index,pager CA "<copy-message>=Archive<enter>" "copy mail to Archive" +macro index,pager CD "<copy-message>=Drafts<enter>" "copy mail to Drafts" +macro index,pager CJ "<copy-message>=Spam<enter>" "copy mail to Spam" +macro index,pager CT "<copy-message>=Trash<enter>" "copy mail to Trash" +macro index,pager CS "<copy-message>=Sent<enter>" "copy mail to Sent" +macro index,pager CC "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox" diff --git a/mutt/school b/mutt/school @@ -29,3 +29,24 @@ account-hook $folder "set imap_user=$my_school_email imap_pass=$my_school_pass_c macro index O "<shell-escape>mbsync -c ~/.config/mbsync/mbsyncrc $my_school_email<enter>" "run mbsync to sync $my_school_email" macro index o "<shell-escape>mbsync -c ~/.config/mbsync/mbsyncrc $my_school_email:Inbox,'Sent Items'<enter>" "run mbsync to sync all mail" +macro index,pager A "<save-message>=Archive<enter>" "move mail to Archive" +macro index,pager gi "<change-folder>=Inbox<enter>" "go to Inbox" +macro index,pager ga "<change-folder>=Archive<enter>" "go to Archive" +macro index,pager gd "<change-folder>=Drafts<enter>" "go to Drafts" +macro index,pager gj "<change-folder>=Junk E-Mail<enter>" "go to Junk E-Mail" +macro index,pager gt "<change-folder>=Deleted Items<enter>" "go to Deleted Items" +macro index,pager gs "<change-folder>=Sent Items<enter>" "go to Sent Items" +macro index,pager MI "<save-message>=Inbox<enter>" "move mail to Inbox" +macro index,pager MA "<save-message>=Archive<enter>" "move mail to Archive" +macro index,pager MD "<save-message>=Drafts<enter>" "move mail to Drafts" +macro index,pager MJ "<save-message>=Junk E-Mail<enter>" "move mail to Junk E-Mail" +macro index,pager MT "<save-message>=Deleted Items<enter>" "move mail to Deleted Items" +macro index,pager MS "<save-message>=Sent Items<enter>" "move mail to Sent Items" +macro index,pager MM "<save-message>?<toggle-mailboxes>" "move a message to a mailbox" +macro index,pager CI "<copy-message>=Inbox<enter>" "copy mail to Inbox" +macro index,pager CA "<copy-message>=Archive<enter>" "copy mail to Archive" +macro index,pager CD "<copy-message>=Drafts<enter>" "copy mail to Drafts" +macro index,pager CJ "<copy-message>=Junk E-Mail<enter>" "copy mail to Junk E-Mail" +macro index,pager CT "<copy-message>=Deleted Items<enter>" "copy mail to Deleted Items" +macro index,pager CS "<copy-message>=Sent Items<enter>" "copy mail to Sent Items" +macro index,pager CC "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"