feat: set up mutt with isync
GitOrigin-RevId: ed8952fc9d50e6268991c6082bf99bc6db4bf247
diff --git a/.copybara/copy.bara.sky b/.copybara/copy.bara.sky
index 28ce726..1b049de 100644
--- a/.copybara/copy.bara.sky
+++ b/.copybara/copy.bara.sky
@@ -56,21 +56,14 @@
after="dotfiles-external",
paths = allPathsExceptCopybara,
),
- core.transform(
- transformations = [
- core.replace(
- before = "${internalCode}",
- after = "",
- multiline = True,
- regex_groups = {
- "internalCode": "(?m)^.*BEGIN-INTERNAL[\\w\\W]*?END-INTERNAL.*$\\n",
- },
- paths = allPathsExceptCopybara,
- ),
- ],
- reversal = [],
- # TODO: Remove this once some code uses this transformation.
- noop_behavior = 'IGNORE_NOOP',
+ core.replace(
+ before = "${internalCode}",
+ after = "",
+ multiline = True,
+ regex_groups = {
+ "internalCode": "(?m)^.*BEGIN-INTERNAL[\\w\\W]*?END-INTERNAL.*$\\n",
+ },
+ paths = allPathsExceptCopybara,
),
metadata.remove_label('Change-Id'),
],
diff --git a/dot_mailcap b/dot_mailcap
new file mode 100644
index 0000000..15c9674
--- /dev/null
+++ b/dot_mailcap
@@ -0,0 +1 @@
+image/*; (clear && img2sixel %s); needsterminal
diff --git a/private_dot_config/isyncrc.tmpl b/private_dot_config/isyncrc.tmpl
new file mode 100644
index 0000000..69f6439
--- /dev/null
+++ b/private_dot_config/isyncrc.tmpl
@@ -0,0 +1,27 @@
+# Config file for isync's mbsync
+#
+# Heavily inspired by:
+# https://wiki.archlinux.org/index.php?title=Isync&oldid=823186#Configuring.
+
+IMAPAccount gmail
+Host imap.gmail.com
+# The User and PassCmd fields are not available in dotfiles-external, only in
+# the private repo, sorry.
+AuthMechs XOAUTH2
+TLSType IMAPS
+
+IMAPStore gmail-remote
+Account gmail
+
+MaildirStore gmail-local
+SubFolders Verbatim
+Path ~/.mail/gmail/
+Inbox ~/.mail/gmail/Inbox
+
+Channel gmail-inbox
+Far :gmail-remote:
+Near :gmail-local:
+Patterns "INBOX" "[Gmail]/Drafts"
+Create Both
+Expunge Both
+SyncState *
diff --git a/private_dot_config/mutt/muttrc.tmpl b/private_dot_config/mutt/muttrc.tmpl
new file mode 100644
index 0000000..ae4c91c
--- /dev/null
+++ b/private_dot_config/mutt/muttrc.tmpl
@@ -0,0 +1,25 @@
+set mbox_type = "Maildir"
+set folder = "~/.mail/gmail"
+set spoolfile = "+Inbox"
+set header_cache = "~/.cache/mutt/header_cache"
+set postponed = "+[Gmail]/Drafts"
+
+# The SMTP configuration is not available in dotfiles-external, only in the
+# private dotfiles repo.
+# If you want to know how I set this up, please don't hesitate to ask me
+# personally! :)
+
+bind index,pager B sidebar-toggle-visible
+set sidebar_divider_char = '│'
+set sidebar_format = '%B %<N?(%N)>%* %S'
+bind index,pager \Cp sidebar-prev
+bind index,pager \Cn sidebar-next
+bind index,pager \Co sidebar-open
+
+set sort = "threads"
+# Always quote the message when replying
+set include = "yes"
+
+mailboxes +Inbox +[Gmail]/Drafts
+# The alternates configuration is not available in dotfiles-external either,
+# sorry.