dotfiles

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

school (3881B)


      1 # vim: syntax=neomuttrc
      2 # Receive
      3 source secret
      4 set imap_user=$my_school_username
      5 set imap_pass=$my_school_pass_id
      6 set folder = ~/.local/share/mail/$my_school_email/
      7 set postponed = +Drafts
      8 set trash = +"Deleted Items"
      9 set record = ""     # office365 automatically saves sent mail
     10 set mbox = +Archive
     11 
     12 
     13 # unmailboxes *
     14 # mailboxes +Inbox +Archive +Drafts +"Sent Items" +"Deleted Items" +"Junk Email"
     15 # set spoolfile = +Inbox
     16 # For notmuch:
     17 unmailboxes *
     18 unvirtual-mailboxes *
     19 virtual-mailboxes \
     20   "Inbox (S)" "notmuch://?query=folder:$my_school_email/Inbox" \
     21   "Archive (2M) (S)" "notmuch://?query=folder:$my_school_email/Archive and date:2M..today" \
     22   "Drafts (S)" "notmuch://?query=folder:$my_school_email/Drafts" \
     23   "Sent (S)" "notmuch://?query='folder:\"$my_school_email/Sent Items\"'" \
     24   "Trash (S)" "notmuch://?query='folder:\"$my_school_email/Deleted Items\"'" \
     25   "Spam (S)" "notmuch://?query='folder:\"$my_school_email/Junk Email\"'" \
     26   "Archive (All) (S)" "notmuch://?query=folder:$my_school_email/Archive"
     27 
     28 set spoolfile = "Inbox (S)"
     29 
     30 set header_cache = ~/.cache/mutt/$my_school_email/headers
     31 set message_cachedir = ~/.cache/mutt/$my_school_email/bodies
     32 
     33 # Send
     34 set realname=$my_name
     35 set from=$my_school_email
     36 set sendmail="msmtp -a $my_school_email"
     37 set sendmail_wait = 0
     38 alias me $realname <$my_school_email>
     39 set signature=""
     40 set ssl_force_tls = yes
     41 set ssl_starttls = yes
     42 
     43 # Hook -- IMPORTANT!
     44 account-hook $folder "set imap_user=$my_school_email imap_pass=$my_school_pass_cmd"
     45 
     46 # Retrieve new email
     47 macro index O "<shell-escape>mbsync -c ~/.config/mbsync/mbsyncrc $my_school_email && notmuch-hook<enter>" "run mbsync to sync $my_school_email"
     48 macro index o "<shell-escape>mbsync -c ~/.config/mbsync/mbsyncrc $my_school_email:INBOX,'Sent Items' && notmuch-hook<enter>" "run mbsync to sync all mail"
     49 
     50 # Delete
     51 macro index,pager d "\
     52 <delete-message>\
     53 <modify-labels-then-hide>-inbox -archive -draft -spam +trash -sent -unread<enter>"
     54 
     55 # Actually delete
     56 bind index,pager D purge-message
     57 
     58 # Undelete
     59 macro index,pager u "\
     60 <undelete-message>\
     61 <modify-labels-then-hide>-trash<enter>"
     62 
     63 # Changing folders
     64 macro index,pager gi "<change-vfolder>Inbox (S)<enter>" "go to Inbox"
     65 macro index,pager ga "<change-vfolder>Archive (2M) (S)<enter>" "go to recent Archive"
     66 macro index,pager gA "<change-vfolder>Archive (All) (S)<enter>" "go to Archive"
     67 macro index,pager gd "<change-vfolder>Drafts (S)<enter>" "go to Drafts"
     68 macro index,pager gj "<change-vfolder>Spam (S)<enter>" "go to Spam"
     69 macro index,pager gt "<change-vfolder>Trash (S)<enter>" "go to Trash"
     70 macro index,pager gs "<change-vfolder>Sent (S)<enter>" "go to Sent"
     71 
     72 # Moving emails
     73 macro index,pager a "<modify-labels>-inbox +archive -draft -spam -trash -sent -unread<enter><tag-prefix><save-message>=Archive<enter><sync-mailbox>" "move mail to Archive"
     74 macro index,pager MI "<modify-labels>+inbox -archive -draft -spam -trash -sent -unread<enter><tag-prefix><save-message>=Inbox<enter><sync-mailbox>" "move mail to Inbox"
     75 macro index,pager MA "<modify-labels>-inbox +archive -draft -spam -trash -sent -unread<enter><tag-prefix><save-message>=Archive<enter><sync-mailbox>" "move mail to Archive"
     76 macro index,pager MD "<modify-labels>-inbox -archive +draft -spam -trash -sent -unread<enter><tag-prefix><save-message>=Drafts<enter><sync-mailbox>" "move mail to Drafts"
     77 macro index,pager MJ "<modify-labels>-inbox -archive -draft +spam -trash -sent -unread<enter><tag-prefix><save-message>=Junk Email<enter><sync-mailbox>" "move mail to Junk Email"
     78 macro index,pager MT "<modify-labels>-inbox -archive -draft -spam +trash -sent -unread<enter><tag-prefix><save-message>=Deleted Items<enter><sync-mailbox>" "move mail to Deleted Items"
     79 macro index,pager MS "<modify-labels>-inbox -archive -draft -spam -trash +sent -unread<enter><tag-prefix><save-message>=Sent Items<enter><sync-mailbox>" "move mail to Sent Items"
     80