From 8a4d8d3e1155a66c1bdf5f794eebc1261656ffe8 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Mon, 14 Feb 2022 22:53:05 +0330 Subject: fix for gmail inboxes --- .mutt/.muttrc | 16 +++++++++------- .mutt/account.gmail | 4 ++-- .mutt/account.self | 3 ++- 3 files changed, 13 insertions(+), 10 deletions(-) (limited to '.mutt') diff --git a/.mutt/.muttrc b/.mutt/.muttrc index 9b229c6..1575761 100644 --- a/.mutt/.muttrc +++ b/.mutt/.muttrc @@ -1,4 +1,7 @@ # vim: filetype=neomuttrc +set mailcap_path= $HOME/.mutt/mailcap +set allow_ansi +set smart_wrap set imap_keepalive = 900 set timeout=60 set move = no @@ -7,13 +10,15 @@ set ssl_force_tls=yes folder-hook 'account.gmail' 'source ~/.mutt/account.gmail' folder-hook 'account.self' 'source ~/.mutt/account.self' +folder-hook 'account.zharf' 'source ~/.mutt/account.zharf' # default account source ~/.mutt/account.self # source ~/.mutt/account.gmail -macro index 'source ~/.mutt/account.self!' -macro index 'source ~/.mutt/account.gmail!' +macro index,pager 'source ~/.mutt/account.self!' +macro index,pager 'source ~/.mutt/account.gmail!' +macro index,pager 'source ~/.mutt/account.zharf!' # macros macro index A "T~N;WNT~O;WO\CT~T” “mark all messages read" @@ -170,6 +175,8 @@ color body brightcolor39 default "([a-z][a-z0-9+-]*://(((([a-z # and a heavy handed email regex color body brightcolor39 default "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])" +set display_filter="perl -0777pe 's/___{10,}[^_]*microsoft teams meeting.*to join the meeting<([^>]*).*(___{10,})/\\n────────────────────────────────────────────────────────────────────────\\n\\nTeams Meeting ~~\\n\\nMeeting URL:\\n$1\\n\\n────────────────────────────────────────────────────────────────────────/is'| sed 's/^\\(To\\|CC\\): \\([^<]*[^>]\\)$/\\1\:<\\2>/g' | perl -0777pe 's/(((?!.*CC:)To:|CC:).+?(?=>\\n)>)/$1!REMOVE_ME!\\n!END!/gs' | sed '/^To:/{;:l N;/!END!/b; s/\\(\\n\\| *\\|\\t\\t*\\)/ /g; bl}' | sed '/^To:/,/>$/ s/\\([^>]*>,\\?\\)/\\1\\n/g' | sed -e 's/^ \\(CC:\\)\\(.*$\\)/\\1\\n\\2/' -e 's/^\\(To:\\)\\(.*$\\)/\\1 --------------------------------------------------------------------\\n\\2/' -e 's/^!END!$/------------------------------------------------------------------------/' -e '/!REMOVE_ME!/d' -e '/\\[-- Type: text.* --\\]/d' -e '/\\[-- Autoview.* --\\]/d' -e '/\\[-- Type.* --\\]/d' -e '/\\[-- .*unsupported.* --\\]/d' -e '/\\[-- Attachment #[0-9] --\\]/d' -e 's/Attachment #[0-9]: //g' -e '/./,/^$/!d' -e 's/\\([A-Z]*\\), *\\([A-Za-z]*\\)\\(\"\\)\\?/\\2 \\L\\u\\1\\E\\3/g'" + # simplified regex for URL & email #color body magenta default "(ftp|https?|gopher|news|telnet|finger)://[^ \"\t\r\n]+" #color body magenta default "[-a-z_0-9.]+@[-a-z_0-9.]+" @@ -243,7 +250,6 @@ color status default default '\(threads/last-date-received\)' color status red default '\[([^]]+)\]' 1 color status brightwhite default 'NeoMutt: ([^ ]+)' 1 -set mailcap_path = ~/.mutt/mailcap auto_view text/html #set pager_index_lines=10 @@ -303,7 +309,3 @@ color body brightmagenta default "-- Patch Links --" color body green default "^Merged #.*" color body red default "^Closed #.*" color body brightblue default "^Reply to this email.*" - -# set pager_format=" %n %zc  %T %s%*  %{!%d %b · %H:%M} %?X?  %X ? %P  " -# set vfolder_format = " %N %?n?%3n& ? %8m  · %f" -# set attach_format = "%u%D  %T%-75.75d %?T?%& ? %5s · %m/%M" diff --git a/.mutt/account.gmail b/.mutt/account.gmail index f3fc94f..3f0ebf0 100644 --- a/.mutt/account.gmail +++ b/.mutt/account.gmail @@ -10,8 +10,8 @@ set folder = 'imaps://imap.gmail.com:993' set spoolfile = '+Inbox' set postponed = '+Drafts' set record = '+Sent' -set trash = '+Trash' +set trash = '' set header_cache = ~/.mutt/gmail/cache/headers set message_cachedir = ~/.mutt/gmail/cache/bodies set certificate_file = ~/.mutt/gmail/certificates -mailboxes "+Inbox" "+Drafts" "+Sent" "+Trash" +mailboxes "Inbox" diff --git a/.mutt/account.self b/.mutt/account.self index a1ff604..0b33c94 100644 --- a/.mutt/account.self +++ b/.mutt/account.self @@ -14,4 +14,5 @@ set trash = '+Trash' set header_cache = ~/.mutt/self/cache/headers set message_cachedir = ~/.mutt/self/cache/bodies set certificate_file = ~/.mutt/self/certificates -mailboxes "+INBOX" "+Drafts" "+Sent" "+Trash" +# mailboxes "+INBOX" "+Drafts" "+Sent" "+Trash" +mailboxes "+INBOX" -- cgit v1.2.3