commit fac7ba1708ba7f4c5ad2f6660f8794f4f49c1619
parent be4f53d6460f0da08acbfbe2e94e74f5f4556d2b
Author: Alex Balgavy <alex@balgavy.eu>
Date: Tue, 23 Nov 2021 11:30:20 +0100
Rename folder, I'm using neomutt not mutt
Diffstat:
10 files changed, 341 insertions(+), 341 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -3,7 +3,7 @@
# Secrets
shell/secret_env
-mutt/secret
+neomutt/secret
# Email stuff
notmuch/
diff --git a/dot.map b/dot.map
@@ -42,7 +42,7 @@ joplin/keymap.json: ~/.config/joplin/keymap.json
sxiv: ~/.config/sxiv
w3m: ~/.config/w3m
scim/scimrc: ~/.config/scimrc
-mutt: ~/.config/mutt
+neomutt: ~/.config/neomutt
urlview/urlview: ~/.urlview
gnupg: ~/.config/gnupg
mpd: ~/.config/mpd
diff --git a/mutt/muttrc b/mutt/muttrc
@@ -1,176 +0,0 @@
-# vim: filetype=neomuttrc foldmethod=marker
-source `{ [ -f ~/.config/dark-theme ] && printf "colors-dark"; } || printf "colors-light";`
-
-# Don't ask to press key on shell commands
-unset wait_key
-
-# Don't move to next message when modifying -- this breaks notmuch macros
-set resolve = no
-
-set mbox_type = Maildir
-set mail_check=0 # minimum time between scans
-unset mark_old # it's enough to see whats unread
-set mailcap_path = ~/.config/mailcap
-
-# PGP options
-set pgp_default_key = 0x67A9DD9A68AE0B7C
-set crypt_autosign
-set crypt_verify_sig
-set crypt_replysign
-set crypt_opportunistic_encrypt
-set pgp_self_encrypt
-set postpone_encrypt
-
-# We want weed
-set weed
-# (weed headers when displaying, forwarding, printing, or replying)
-
-set delete # don't ask, just do
-unset confirmappend # don't ask, just do!
-set quit # don't ask, just do!!
-auto_view text/*
-
-# Abort when I forget an attachment
-set abort_noattach = yes
-set abort_noattach_regex = "attach|attached|attachments?"
-
-# For key bindings, do :exec what-key
-
-# Sidebar
-set sidebar_visible = yes
-set sidebar_width = 20
-set sidebar_short_path = yes
-set sidebar_next_new_wrap = yes
-set mail_check_stats
-set sidebar_format = '%D%?F? [%F]?%* %?N?%N/? %?S?%S?'
-bind index,pager \Cp sidebar-prev
-bind index,pager \Cn sidebar-next
-bind index,pager \Cl sidebar-open
-bind index,pager B sidebar-toggle-visible
-bind index t tag-entry
-
-# Switch ; and : keys
-unbind generic,pager :
-unbind generic,pager ;
-bind generic,pager \; enter-command
-bind generic : tag-prefix
-
-set date_format = "%d/%m"
-set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c) %> [%g]"
-
-# Github issue was fixed, yay!
-# Threads should be sorted by date, top-to-botom.
-# Newest top-level messages should appear at the top.
-set use_threads = yes
-set sort = reverse-last-date-received
-set sort_aux = date-received
-
-# there's an issue with sorting where messages in threads should be sorted by date, top-to-bottom.
-# but at the moment it's a "wontfix". hopefully that changes soon.
-# https://github.com/neomutt/neomutt/issues/2342,
-set uncollapse_jump # don't collapse on an unread message
-set sort_re # thread based also on regex
-set reply_regex = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
-
-# Pager
-set pager_index_lines = 10 # number of index lines to show
-set pager_context = 3 # number of context lines to show
-set pager_stop # don't go to next message automatically
-set menu_scroll # scroll in menus
-set tilde # show tildes like in vim
-unset markers # no ugly plus signs
-set quote_regex = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
-alternative_order text/plain text/enriched text/html
-
-bind pager k previous-line
-bind pager j next-line
-bind pager J next-entry
-bind pager K previous-entry
-bind pager g noop
-bind pager gg top
-bind pager G bottom
-
-macro index,pager,attach,compose U "\
-<enter-command> set my_pipe_decode=\$pipe_decode pipe_decode<Enter>\
-<pipe-message> urlview<Enter>\
-<enter-command> set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<Enter>" \
-"call urlview to extract URLs out of a message"
-
-# Composing
-set edit_headers # show headers when composing
-set fast_reply # skip to compose when replying
-set fcc_attach # save attachments with the body
-set mime_forward # forward attachments as part of body
-set forward_format = "Fwd: %s" # format of subject when forwarding
-set forward_decode # decode when forwarding
-set attribution = "On %d, %n wrote:" # format of quoting header
-set reply_to # reply to Reply to: field
-set reverse_name # reply as whomever it was to
-set include # include message in replies
-set forward_quote # include message in forwards
-set attach_format = "%u%D%I %t%4n %T%.40d (%.40F -> %.40f)%> [%.7m/%.10M, %.6e%?C?, %C?, %s]"
-
-# General mappings
-macro index,pager S '<sync-mailbox><shell-escape>notmuch-hook<enter>'
-bind index,pager | pipe-message
-bind index,pager s save-message
-bind index,pager m mail
-bind compose p postpone-message
-bind compose l view-attach
-bind compose h exit
-bind index p recall-message
-bind index g noop
-bind index gg first-entry
-bind index G last-entry
-bind index,pager R group-reply
-bind index,pager r reply
-bind index <space> collapse-thread
-bind generic,index j next-entry
-bind generic,index k previous-entry
-bind index ! shell-escape
-bind attach <return> view-mailcap
-bind attach l view-mailcap
-bind compose \Cr rename-attachment
-bind compose d edit-description
-bind editor <space> noop
-bind index G last-entry
-bind index gg first-entry
-bind pager,attach h exit
-bind pager l view-attachments
-bind index L limit
-bind index h noop
-bind index l display-message
-macro browser h '<change-dir><kill-line>..<enter>' "Go to parent folder"
-bind index,pager H view-raw-message
-bind browser l select-entry
-bind pager,browser gg top-page
-bind pager,browser G bottom-page
-bind index,pager,browser \Cd half-down
-bind index,pager,browser \Cu half-up
-bind pager <space> half-down
-bind pager \C? half-up # backspace key
-bind index \031 previous-undeleted # Mouse wheel
-bind index \005 next-undeleted # Mouse wheel
-bind pager \031 previous-line # Mouse wheel
-bind pager \005 next-line # Mouse wheel
-set query_command = "khard email --parsable %s"
-bind editor <Tab> complete-query
-bind editor ^T complete
-bind index,pager M noop
-bind index,pager,browser / search
-bind index,pager,browser n search-next
-bind index,pager,browser N search-opposite
-macro index A "<limit>all<enter>"
-
-set nm_default_url = "notmuch://`notmuch config get database.path`"
-bind index,pager + entire-thread
-bind index,pager \Cf vfolder-from-query
-
-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-vfolder>Inbox (S)<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-vfolder>Inbox (P)<enter><check-stats>' "switch to personal"
diff --git a/mutt/personal b/mutt/personal
@@ -1,83 +0,0 @@
-# vim: syntax=neomuttrc
-# Receive
-source secret
-set imap_user=$my_personal_email
-set imap_pass=$my_personal_pass_cmd
-set folder = ~/.local/share/mail/$my_personal_email
-set postponed = +Drafts
-set trash = +Trash
-set record = +Sent
-set mbox = +Archive
-
-# The setup with regular mutt
-# set spoolfile = +Inbox
-# unmailboxes *
-# mailboxes +Inbox +Archive +Drafts +Tickets +Sent +Trash +Spam
-#
-# But to use notmuch, I need to use virtual mailboxes:
-# (it's on the wishlist - https://github.com/neomutt/neomutt/issues/742)
-unmailboxes *
-unvirtual-mailboxes *
-virtual-mailboxes \
- "Inbox (P)" "notmuch://?query=folder:$my_personal_email/Inbox" \
- "Archive (2M) (P)" "notmuch://?query=folder:$my_personal_email/Archive and date:2M..today" \
- "Drafts (P)" "notmuch://?query=folder:$my_personal_email/Drafts" \
- "Follow-up (P)" "notmuch://?query=folder:/$my_personal_email/ and tag:followup" \
- "Tickets (P)" "notmuch://?query=folder:$my_personal_email/Tickets" \
- "Sent (P)" "notmuch://?query=folder:$my_personal_email/Sent" \
- "Trash (P)" "notmuch://?query=folder:$my_personal_email/Trash" \
- "Spam (P)" "notmuch://?query=folder:$my_personal_email/Spam" \
- "Archive (All) (P)" "notmuch://?query=folder:$my_personal_email/Archive"
-
-set spoolfile = "Inbox (P)"
-
-set header_cache = '~/.cache/mutt/$my_personal_email/headers'
-set message_cachedir = '~/.cache/mutt/$my_personal_email/bodies'
-
-# Send
-set realname=$my_name
-set from=$my_personal_email
-set sendmail="msmtp -a $my_personal_email"
-set sendmail_wait = 0
-alias me $realname <$my_personal_email>
-set signature=""
-set ssl_force_tls = yes
-set ssl_starttls = yes
-
-# Hook -- IMPORTANT!
-account-hook $folder "set imap_user=$my_personal_email imap_pass=$my_personal_pass_cmd"
-
-# Retrieve new email
-macro index O "<shell-escape>mbsync -c ~/.config/mbsync/mbsyncrc $my_personal_email && notmuch-hook<enter>" "run mbsync to sync $my_personal_email"
-macro index o "<shell-escape>mbsync -c ~/.config/mbsync/mbsyncrc $my_personal_email:INBOX,Sent && notmuch-hook<enter>" "run mbsync to sync all mail"
-
-# Delete
-macro index,pager d "\
-<delete-message>\
-<modify-labels-then-hide>-inbox -archive -draft -spam +trash -sent -unread<enter>"
-
-# Actually delete
-bind index,pager D purge-message
-
-# Undelete
-macro index,pager u "\
-<undelete-message>\
-<modify-labels-then-hide>-trash<enter>"
-
-# Changing folders
-macro index,pager gi "<change-vfolder>Inbox (P)<enter>" "go to Inbox"
-macro index,pager ga "<change-vfolder>Archive (2M) (P)<enter>" "go to recent Archive"
-macro index,pager gA "<change-vfolder>Archive (All) (P)<enter>" "go to Archive"
-macro index,pager gd "<change-vfolder>Drafts (P)<enter>" "go to Drafts"
-macro index,pager gj "<change-vfolder>Spam (P)<enter>" "go to Spam"
-macro index,pager gt "<change-vfolder>Trash (P)<enter>" "go to Trash"
-macro index,pager gs "<change-vfolder>Sent (P)<enter>" "go to Sent"
-
-# Moving emails
-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"
-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"
-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"
-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"
-macro index,pager MJ "<modify-labels>-inbox -archive -draft +spam -trash -sent -unread<enter><tag-prefix><save-message>=Spam<enter><sync-mailbox>" "move mail to Spam"
-macro index,pager MT "<modify-labels>-inbox -archive -draft -spam +trash -sent -unread<enter><tag-prefix><save-message>=Trash<enter><sync-mailbox>" "move mail to Trash"
-macro index,pager MS "<modify-labels>-inbox -archive -draft -spam -trash +sent -unread<enter><tag-prefix><save-message>=Sent<enter><sync-mailbox>" "move mail to Sent"
diff --git a/mutt/school b/mutt/school
@@ -1,80 +0,0 @@
-# vim: syntax=neomuttrc
-# Receive
-source secret
-set imap_user=$my_school_username
-set imap_pass=$my_school_pass_id
-set folder = ~/.local/share/mail/$my_school_email/
-set postponed = +Drafts
-set trash = +"Deleted Items"
-set record = "" # office365 automatically saves sent mail
-set mbox = +Archive
-
-
-# unmailboxes *
-# mailboxes +Inbox +Archive +Drafts +"Sent Items" +"Deleted Items" +"Junk Email"
-# set spoolfile = +Inbox
-# For notmuch:
-unmailboxes *
-unvirtual-mailboxes *
-virtual-mailboxes \
- "Inbox (S)" "notmuch://?query=folder:$my_school_email/Inbox" \
- "Archive (2M) (S)" "notmuch://?query=folder:$my_school_email/Archive and date:2M..today" \
- "Drafts (S)" "notmuch://?query=folder:$my_school_email/Drafts" \
- "Sent (S)" "notmuch://?query='folder:\"$my_school_email/Sent Items\"'" \
- "Trash (S)" "notmuch://?query='folder:\"$my_school_email/Deleted Items\"'" \
- "Spam (S)" "notmuch://?query='folder:\"$my_school_email/Junk Email\"'" \
- "Archive (All) (S)" "notmuch://?query=folder:$my_school_email/Archive"
-
-set spoolfile = "Inbox (S)"
-
-set header_cache = ~/.cache/mutt/$my_school_email/headers
-set message_cachedir = ~/.cache/mutt/$my_school_email/bodies
-
-# Send
-set realname=$my_name
-set from=$my_school_email
-set sendmail="msmtp -a $my_school_email"
-set sendmail_wait = 0
-alias me $realname <$my_school_email>
-set signature=""
-set ssl_force_tls = yes
-set ssl_starttls = yes
-
-# Hook -- IMPORTANT!
-account-hook $folder "set imap_user=$my_school_email imap_pass=$my_school_pass_cmd"
-
-# Retrieve new email
-macro index O "<shell-escape>mbsync -c ~/.config/mbsync/mbsyncrc $my_school_email && notmuch-hook<enter>" "run mbsync to sync $my_school_email"
-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"
-
-# Delete
-macro index,pager d "\
-<delete-message>\
-<modify-labels-then-hide>-inbox -archive -draft -spam +trash -sent -unread<enter>"
-
-# Actually delete
-bind index,pager D purge-message
-
-# Undelete
-macro index,pager u "\
-<undelete-message>\
-<modify-labels-then-hide>-trash<enter>"
-
-# Changing folders
-macro index,pager gi "<change-vfolder>Inbox (S)<enter>" "go to Inbox"
-macro index,pager ga "<change-vfolder>Archive (2M) (S)<enter>" "go to recent Archive"
-macro index,pager gA "<change-vfolder>Archive (All) (S)<enter>" "go to Archive"
-macro index,pager gd "<change-vfolder>Drafts (S)<enter>" "go to Drafts"
-macro index,pager gj "<change-vfolder>Spam (S)<enter>" "go to Spam"
-macro index,pager gt "<change-vfolder>Trash (S)<enter>" "go to Trash"
-macro index,pager gs "<change-vfolder>Sent (S)<enter>" "go to Sent"
-
-# Moving emails
-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"
-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"
-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"
-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"
-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"
-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"
-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"
-
diff --git a/mutt/colors-dark b/neomutt/colors-dark
diff --git a/mutt/colors-light b/neomutt/colors-light
diff --git a/neomutt/muttrc b/neomutt/muttrc
@@ -0,0 +1,176 @@
+# vim: filetype=neomuttrc foldmethod=marker
+source `{ [ -f ~/.config/dark-theme ] && printf "colors-dark"; } || printf "colors-light";`
+
+# Don't ask to press key on shell commands
+unset wait_key
+
+# Don't move to next message when modifying -- this breaks notmuch macros
+set resolve = no
+
+set mbox_type = Maildir
+set mail_check=0 # minimum time between scans
+unset mark_old # it's enough to see whats unread
+set mailcap_path = ~/.config/mailcap
+
+# PGP options
+set pgp_default_key = 0x67A9DD9A68AE0B7C
+set crypt_autosign
+set crypt_verify_sig
+set crypt_replysign
+set crypt_opportunistic_encrypt
+set pgp_self_encrypt
+set postpone_encrypt
+
+# We want weed
+set weed
+# (weed headers when displaying, forwarding, printing, or replying)
+
+set delete # don't ask, just do
+unset confirmappend # don't ask, just do!
+set quit # don't ask, just do!!
+auto_view text/*
+
+# Abort when I forget an attachment
+set abort_noattach = yes
+set abort_noattach_regex = "attach|attached|attachments?"
+
+# For key bindings, do :exec what-key
+
+# Sidebar
+set sidebar_visible = yes
+set sidebar_width = 20
+set sidebar_short_path = yes
+set sidebar_next_new_wrap = yes
+set mail_check_stats
+set sidebar_format = '%D%?F? [%F]?%* %?N?%N/? %?S?%S?'
+bind index,pager \Cp sidebar-prev
+bind index,pager \Cn sidebar-next
+bind index,pager \Cl sidebar-open
+bind index,pager B sidebar-toggle-visible
+bind index t tag-entry
+
+# Switch ; and : keys
+unbind generic,pager :
+unbind generic,pager ;
+bind generic,pager \; enter-command
+bind generic : tag-prefix
+
+set date_format = "%d/%m"
+set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c) %> [%g]"
+
+# Github issue was fixed, yay!
+# Threads should be sorted by date, top-to-botom.
+# Newest top-level messages should appear at the top.
+set use_threads = yes
+set sort = reverse-last-date-received
+set sort_aux = date-received
+
+# there's an issue with sorting where messages in threads should be sorted by date, top-to-bottom.
+# but at the moment it's a "wontfix". hopefully that changes soon.
+# https://github.com/neomutt/neomutt/issues/2342,
+set uncollapse_jump # don't collapse on an unread message
+set sort_re # thread based also on regex
+set reply_regex = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
+
+# Pager
+set pager_index_lines = 10 # number of index lines to show
+set pager_context = 3 # number of context lines to show
+set pager_stop # don't go to next message automatically
+set menu_scroll # scroll in menus
+set tilde # show tildes like in vim
+unset markers # no ugly plus signs
+set quote_regex = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
+alternative_order text/plain text/enriched text/html
+
+bind pager k previous-line
+bind pager j next-line
+bind pager J next-entry
+bind pager K previous-entry
+bind pager g noop
+bind pager gg top
+bind pager G bottom
+
+macro index,pager,attach,compose U "\
+<enter-command> set my_pipe_decode=\$pipe_decode pipe_decode<Enter>\
+<pipe-message> urlview<Enter>\
+<enter-command> set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<Enter>" \
+"call urlview to extract URLs out of a message"
+
+# Composing
+set edit_headers # show headers when composing
+set fast_reply # skip to compose when replying
+set fcc_attach # save attachments with the body
+set mime_forward # forward attachments as part of body
+set forward_format = "Fwd: %s" # format of subject when forwarding
+set forward_decode # decode when forwarding
+set attribution = "On %d, %n wrote:" # format of quoting header
+set reply_to # reply to Reply to: field
+set reverse_name # reply as whomever it was to
+set include # include message in replies
+set forward_quote # include message in forwards
+set attach_format = "%u%D%I %t%4n %T%.40d (%.40F -> %.40f)%> [%.7m/%.10M, %.6e%?C?, %C?, %s]"
+
+# General mappings
+macro index,pager S '<sync-mailbox><shell-escape>notmuch-hook<enter>'
+bind index,pager | pipe-message
+bind index,pager s save-message
+bind index,pager m mail
+bind compose p postpone-message
+bind compose l view-attach
+bind compose h exit
+bind index p recall-message
+bind index g noop
+bind index gg first-entry
+bind index G last-entry
+bind index,pager R group-reply
+bind index,pager r reply
+bind index <space> collapse-thread
+bind generic,index j next-entry
+bind generic,index k previous-entry
+bind index ! shell-escape
+bind attach <return> view-mailcap
+bind attach l view-mailcap
+bind compose \Cr rename-attachment
+bind compose d edit-description
+bind editor <space> noop
+bind index G last-entry
+bind index gg first-entry
+bind pager,attach h exit
+bind pager l view-attachments
+bind index L limit
+bind index h noop
+bind index l display-message
+macro browser h '<change-dir><kill-line>..<enter>' "Go to parent folder"
+bind index,pager H view-raw-message
+bind browser l select-entry
+bind pager,browser gg top-page
+bind pager,browser G bottom-page
+bind index,pager,browser \Cd half-down
+bind index,pager,browser \Cu half-up
+bind pager <space> half-down
+bind pager \C? half-up # backspace key
+bind index \031 previous-undeleted # Mouse wheel
+bind index \005 next-undeleted # Mouse wheel
+bind pager \031 previous-line # Mouse wheel
+bind pager \005 next-line # Mouse wheel
+set query_command = "khard email --parsable %s"
+bind editor <Tab> complete-query
+bind editor ^T complete
+bind index,pager M noop
+bind index,pager,browser / search
+bind index,pager,browser n search-next
+bind index,pager,browser N search-opposite
+macro index A "<limit>all<enter>"
+
+set nm_default_url = "notmuch://`notmuch config get database.path`"
+bind index,pager + entire-thread
+bind index,pager \Cf vfolder-from-query
+
+bind index,pager i noop
+source school
+folder-hook $folder 'source ~/.config/neomutt/school'
+macro index,pager is '<sync-mailbox><enter-command>source ~/.config/neomutt/school<enter><change-vfolder>Inbox (S)<enter><check-stats>' "switch to school"
+
+source personal
+folder-hook $folder 'source ~/.config/neomutt/personal'
+macro index,pager ip '<sync-mailbox><enter-command>source ~/.config/neomutt/personal<enter><change-vfolder>Inbox (P)<enter><check-stats>' "switch to personal"
diff --git a/neomutt/personal b/neomutt/personal
@@ -0,0 +1,83 @@
+# vim: syntax=neomuttrc
+# Receive
+source secret
+set imap_user=$my_personal_email
+set imap_pass=$my_personal_pass_cmd
+set folder = ~/.local/share/mail/$my_personal_email
+set postponed = +Drafts
+set trash = +Trash
+set record = +Sent
+set mbox = +Archive
+
+# The setup with regular mutt
+# set spoolfile = +Inbox
+# unmailboxes *
+# mailboxes +Inbox +Archive +Drafts +Tickets +Sent +Trash +Spam
+#
+# But to use notmuch, I need to use virtual mailboxes:
+# (it's on the wishlist - https://github.com/neomutt/neomutt/issues/742)
+unmailboxes *
+unvirtual-mailboxes *
+virtual-mailboxes \
+ "Inbox (P)" "notmuch://?query=folder:$my_personal_email/Inbox" \
+ "Archive (2M) (P)" "notmuch://?query=folder:$my_personal_email/Archive and date:2M..today" \
+ "Drafts (P)" "notmuch://?query=folder:$my_personal_email/Drafts" \
+ "Follow-up (P)" "notmuch://?query=folder:/$my_personal_email/ and tag:followup" \
+ "Tickets (P)" "notmuch://?query=folder:$my_personal_email/Tickets" \
+ "Sent (P)" "notmuch://?query=folder:$my_personal_email/Sent" \
+ "Trash (P)" "notmuch://?query=folder:$my_personal_email/Trash" \
+ "Spam (P)" "notmuch://?query=folder:$my_personal_email/Spam" \
+ "Archive (All) (P)" "notmuch://?query=folder:$my_personal_email/Archive"
+
+set spoolfile = "Inbox (P)"
+
+set header_cache = '~/.cache/neomutt/$my_personal_email/headers'
+set message_cachedir = '~/.cache/neomutt/$my_personal_email/bodies'
+
+# Send
+set realname=$my_name
+set from=$my_personal_email
+set sendmail="msmtp -a $my_personal_email"
+set sendmail_wait = 0
+alias me $realname <$my_personal_email>
+set signature=""
+set ssl_force_tls = yes
+set ssl_starttls = yes
+
+# Hook -- IMPORTANT!
+account-hook $folder "set imap_user=$my_personal_email imap_pass=$my_personal_pass_cmd"
+
+# Retrieve new email
+macro index O "<shell-escape>mbsync -c ~/.config/mbsync/mbsyncrc $my_personal_email && notmuch-hook<enter>" "run mbsync to sync $my_personal_email"
+macro index o "<shell-escape>mbsync -c ~/.config/mbsync/mbsyncrc $my_personal_email:INBOX,Sent && notmuch-hook<enter>" "run mbsync to sync all mail"
+
+# Delete
+macro index,pager d "\
+<delete-message>\
+<modify-labels-then-hide>-inbox -archive -draft -spam +trash -sent -unread<enter>"
+
+# Actually delete
+bind index,pager D purge-message
+
+# Undelete
+macro index,pager u "\
+<undelete-message>\
+<modify-labels-then-hide>-trash<enter>"
+
+# Changing folders
+macro index,pager gi "<change-vfolder>Inbox (P)<enter>" "go to Inbox"
+macro index,pager ga "<change-vfolder>Archive (2M) (P)<enter>" "go to recent Archive"
+macro index,pager gA "<change-vfolder>Archive (All) (P)<enter>" "go to Archive"
+macro index,pager gd "<change-vfolder>Drafts (P)<enter>" "go to Drafts"
+macro index,pager gj "<change-vfolder>Spam (P)<enter>" "go to Spam"
+macro index,pager gt "<change-vfolder>Trash (P)<enter>" "go to Trash"
+macro index,pager gs "<change-vfolder>Sent (P)<enter>" "go to Sent"
+
+# Moving emails
+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"
+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"
+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"
+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"
+macro index,pager MJ "<modify-labels>-inbox -archive -draft +spam -trash -sent -unread<enter><tag-prefix><save-message>=Spam<enter><sync-mailbox>" "move mail to Spam"
+macro index,pager MT "<modify-labels>-inbox -archive -draft -spam +trash -sent -unread<enter><tag-prefix><save-message>=Trash<enter><sync-mailbox>" "move mail to Trash"
+macro index,pager MS "<modify-labels>-inbox -archive -draft -spam -trash +sent -unread<enter><tag-prefix><save-message>=Sent<enter><sync-mailbox>" "move mail to Sent"
diff --git a/neomutt/school b/neomutt/school
@@ -0,0 +1,80 @@
+# vim: syntax=neomuttrc
+# Receive
+source secret
+set imap_user=$my_school_username
+set imap_pass=$my_school_pass_id
+set folder = ~/.local/share/mail/$my_school_email/
+set postponed = +Drafts
+set trash = +"Deleted Items"
+set record = "" # office365 automatically saves sent mail
+set mbox = +Archive
+
+
+# unmailboxes *
+# mailboxes +Inbox +Archive +Drafts +"Sent Items" +"Deleted Items" +"Junk Email"
+# set spoolfile = +Inbox
+# For notmuch:
+unmailboxes *
+unvirtual-mailboxes *
+virtual-mailboxes \
+ "Inbox (S)" "notmuch://?query=folder:$my_school_email/Inbox" \
+ "Archive (2M) (S)" "notmuch://?query=folder:$my_school_email/Archive and date:2M..today" \
+ "Drafts (S)" "notmuch://?query=folder:$my_school_email/Drafts" \
+ "Sent (S)" "notmuch://?query='folder:\"$my_school_email/Sent Items\"'" \
+ "Trash (S)" "notmuch://?query='folder:\"$my_school_email/Deleted Items\"'" \
+ "Spam (S)" "notmuch://?query='folder:\"$my_school_email/Junk Email\"'" \
+ "Archive (All) (S)" "notmuch://?query=folder:$my_school_email/Archive"
+
+set spoolfile = "Inbox (S)"
+
+set header_cache = ~/.cache/neomutt/$my_school_email/headers
+set message_cachedir = ~/.cache/neomutt/$my_school_email/bodies
+
+# Send
+set realname=$my_name
+set from=$my_school_email
+set sendmail="msmtp -a $my_school_email"
+set sendmail_wait = 0
+alias me $realname <$my_school_email>
+set signature=""
+set ssl_force_tls = yes
+set ssl_starttls = yes
+
+# Hook -- IMPORTANT!
+account-hook $folder "set imap_user=$my_school_email imap_pass=$my_school_pass_cmd"
+
+# Retrieve new email
+macro index O "<shell-escape>mbsync -c ~/.config/mbsync/mbsyncrc $my_school_email && notmuch-hook<enter>" "run mbsync to sync $my_school_email"
+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"
+
+# Delete
+macro index,pager d "\
+<delete-message>\
+<modify-labels-then-hide>-inbox -archive -draft -spam +trash -sent -unread<enter>"
+
+# Actually delete
+bind index,pager D purge-message
+
+# Undelete
+macro index,pager u "\
+<undelete-message>\
+<modify-labels-then-hide>-trash<enter>"
+
+# Changing folders
+macro index,pager gi "<change-vfolder>Inbox (S)<enter>" "go to Inbox"
+macro index,pager ga "<change-vfolder>Archive (2M) (S)<enter>" "go to recent Archive"
+macro index,pager gA "<change-vfolder>Archive (All) (S)<enter>" "go to Archive"
+macro index,pager gd "<change-vfolder>Drafts (S)<enter>" "go to Drafts"
+macro index,pager gj "<change-vfolder>Spam (S)<enter>" "go to Spam"
+macro index,pager gt "<change-vfolder>Trash (S)<enter>" "go to Trash"
+macro index,pager gs "<change-vfolder>Sent (S)<enter>" "go to Sent"
+
+# Moving emails
+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"
+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"
+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"
+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"
+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"
+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"
+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"
+