commit 6146059fa1ea697513ba56a18396ca68008963c3 parent f49a482093a97b2c30e87c24ee73292a196596f1 Author: Pablo Cárdenas <pablo.cardenas@imca.edu.pe> Date: Thu, 7 Apr 2022 18:26:08 -0500 Updated muttrc Diffstat:
20 files changed, 212 insertions(+), 99 deletions(-)
diff --git a/home/.gitconfig b/home/.gitconfig @@ -5,5 +5,8 @@ [diff] tool = vimdiff +[diff "gpg"] + textconv = gpg --quiet --decrypt + [merge] tool = vimdiff diff --git a/linux/.mutt/accounts/pablo-cardenas@outlook.com b/linux/.mutt/accounts/pablo-cardenas@outlook.com.rc diff --git a/linux/.mutt/accounts/pablo.cardenas@imca.edu.pe b/linux/.mutt/accounts/pablo.cardenas@imca.edu.pe @@ -1,13 +0,0 @@ -# IMAP -set imap_user = "pablo.cardenas@imca.edu.pe" - -set folder = "imaps://${imap_user}@imap.gmail.com/" -set trash = "+[Gmail]/Papelera" -set postponed = "+[Gmail]/Borradores" - - -# SMPT -set hostname = imca.edu.pe - - -source "~/.mutt/conf.d/google.muttrc" diff --git a/linux/.mutt/accounts/pablo.cardenas@imca.edu.pe.rc b/linux/.mutt/accounts/pablo.cardenas@imca.edu.pe.rc @@ -0,0 +1,14 @@ +# IMAP +set imap_user = "pablo.cardenas@imca.edu.pe" + +set folder = "imaps://${imap_user}@imap.gmail.com/" +set trash = "+[Gmail]/Papelera" +set postponed = "+[Gmail]/Borradores" +mailboxes -label ${imap_user}-INBOX +INBOX + + +# SMPT +set hostname = "imca.edu.pe" + + +source "~/.mutt/conf.d/google.rc" diff --git a/linux/.mutt/accounts/pablocb2303@gmail.com b/linux/.mutt/accounts/pablocb2303@gmail.com @@ -1,13 +0,0 @@ -# IMAP -set imap_user = "pablocb2303@gmail.com" - -set folder = "imaps://${imap_user}@imap.gmail.com/" -set trash = "+[Gmail]/Corbeille" -set postponed = "+[Gmail]/Brouillons" - - -# SMPT -set hostname = "gmail.com" - - -source "~/.mutt/conf.d/google.muttrc" diff --git a/linux/.mutt/accounts/pablocb2303@gmail.com.rc b/linux/.mutt/accounts/pablocb2303@gmail.com.rc @@ -0,0 +1,14 @@ +# IMAP +set imap_user = "pablocb2303@gmail.com" + +set folder = "imaps://${imap_user}@imap.gmail.com/" +set trash = "+[Gmail]/Corbeille" +set postponed = "+[Gmail]/Brouillons" +mailboxes -label ${imap_user}-INBOX +INBOX + + +# SMPT +set hostname = "gmail.com" + + +source "~/.mutt/conf.d/google.rc" diff --git a/linux/.mutt/accounts/pcardenasb@uni.edu.pe b/linux/.mutt/accounts/pcardenasb@uni.edu.pe @@ -1,13 +0,0 @@ -# IMAP -set imap_user = "pcardenasb@uni.edu.pe" - -set folder = "imaps://${imap_user}@imap.gmail.com/" -set trash = "+[Gmail]/Trash" -set postponed = "+[Gmail]/Drafts" - - -# SMPT -set hostname = "uni.edu.pe" - - -source "~/.mutt/conf.d/google.muttrc" diff --git a/linux/.mutt/accounts/pcardenasb@uni.edu.pe.rc b/linux/.mutt/accounts/pcardenasb@uni.edu.pe.rc @@ -0,0 +1,14 @@ +# IMAP +set imap_user = "pcardenasb@uni.edu.pe" + +set folder = "imaps://${imap_user}@imap.gmail.com/" +set trash = "+[Gmail]/Trash" +set postponed = "+[Gmail]/Drafts" +mailboxes -label ${imap_user}-INBOX +INBOX + + +# SMPT +set hostname = "uni.edu.pe" + + +source "~/.mutt/conf.d/google.rc" diff --git a/linux/.mutt/accounts/pcardenasb@uni.pe b/linux/.mutt/accounts/pcardenasb@uni.pe @@ -1,13 +0,0 @@ -# IMAP -set imap_user = "pcardenasb@uni.pe" - -set folder = "imaps://${imap_user}@imap.gmail.com/" -set trash = +[Gmail]/Trash -set postponed = +[Gmail]/Drafts - - -# SMPT -set hostname = "uni.pe" - - -source "~/.mutt/conf.d/google.muttrc" diff --git a/linux/.mutt/accounts/pcardenasb@uni.pe.rc b/linux/.mutt/accounts/pcardenasb@uni.pe.rc @@ -0,0 +1,14 @@ +# IMAP +set imap_user = "pcardenasb@uni.pe" + +set folder = "imaps://${imap_user}@imap.gmail.com/" +set trash = "+[Gmail]/Trash" +set postponed = "+[Gmail]/Drafts" +mailboxes -label ${imap_user}-INBOX +INBOX + + +# SMPT +set hostname = "uni.pe" + + +source "~/.mutt/conf.d/google.rc" diff --git a/linux/.mutt/conf.d/google.muttrc b/linux/.mutt/conf.d/google.muttrc @@ -1,22 +0,0 @@ -# IMAP -set imap_authenticators = "oauthbearer:xoauth2" -set imap_oauth_refresh_command = "~/.mutt/mutt_oauth2.py tokens/${imap_user}.gpg" - -set folder = "imaps://${imap_user}@imap.gmail.com/" -set spoolfile = +INBOX -unset record - - -# SMPT -set smtp_url = "smtps://${imap_user}@smtp.gmail.com" -set smtp_authenticators = ${imap_authenticators} -set smtp_oauth_refresh_command = ${imap_oauth_refresh_command} - -set from = ${imap_user} - -set ssl_force_tls = yes -unset ssl_starttls - - -# Hook -account-hook $folder "set imap_user='${imap_user}' imap_oauth_refresh_command='${imap_oauth_refresh_command}'" diff --git a/linux/.mutt/conf.d/google.rc b/linux/.mutt/conf.d/google.rc @@ -0,0 +1,15 @@ +# IMAP +set imap_authenticators = "oauthbearer:xoauth2" +set imap_oauth_refresh_command = "~/.mutt/mutt_oauth2.py ~/.mutt/tokens/${imap_user}.gpg" + +set folder = "imaps://${imap_user}@imap.gmail.com/" +set spoolfile = +INBOX +unset record + + +# SMPT +set smtp_url = "smtps://${imap_user}@smtp.gmail.com" +set smtp_authenticators = ${imap_authenticators} +set smtp_oauth_refresh_command = ${imap_oauth_refresh_command} + +set from = ${imap_user} diff --git a/linux/.mutt/mailcap b/linux/.mutt/mailcap @@ -1,3 +1,9 @@ -#text/html; elinks -dump -dump-color-mode 1; copiousoutput; +text/html; qutebrowser %s --target private-window &> /dev/null; needsterminal; nametemplate=%s.html; test=test -n "$DISPLAY"; text/html; elinks %s; nametemplate=%s.html; -#text/html; qutebrowser %s; needsterminal; nametemplate=%s.html; +text/html; elinks -dump -dump-color-mode 1; copiousoutput; + +#text/html; elinks -dump -dump-charset %{charset} -default-mime-type text/html %s; needsterminal; copiousoutput; +application/*; zathura %s &> /dev/null; needsterminal; nametemplate=%s.pdf; test=test -n "$DISPLAY"; +image/*; xdg-open %s &> /dev/null; test=test -n "$DISPLAY"; + +application/pdf; pdftotext %s -; copiousoutput; diff --git a/linux/.mutt/muttrc b/linux/.mutt/muttrc @@ -1,7 +1,8 @@ set header_cache = "~/.cache/mutt/" set message_cachedir = "~/.cache/mutt/" -set imap_check_subscribed +unset folder +unset spoolfile set imap_keepalive = 300 unset imap_passive set mail_check = 60 @@ -10,32 +11,21 @@ set mbox_type = Maildir set signature = ~/.mutt/signature.txt set send_charset="utf-8" +set realname = "Pablo Cárdenas" set use_from = yes -set ssl_force_tls = yes +#set ssl_force_tls = yes set mailcap_path = ~/.mutt/mailcap -auto_view text/html -alternative_order text/plain text/html -macro attach 'V' "<pipe-entry>iconv -c --to-code=UTF8 > ~/.cache/mutt/mail.html<enter><shell-escape>$BROWSER ~/.cache/mutt/mail.html<enter>" - -#source "~/.mutt/sample.muttrc-sidebar" source "~/.mutt/gpg.rc" +source "~/.mutt/sidebar.rc" +set sidebar_visible = yes -source "~/.mutt/accounts/pcardenasb@uni.edu.pe" -folder-hook $folder 'source ~/.mutt/accounts/pcardenasb@uni.edu.pe' - -source "~/.mutt/accounts/pcardenasb@uni.pe" -folder-hook $folder 'source ~/.mutt/accounts/pcardenasb@uni.pe' - -source "~/.mutt/accounts/pablo.cardenas@imca.edu.pe" -folder-hook $folder 'source ~/.mutt/accounts/pablo.cardenas@imca.edu.pe' - -source "~/.mutt/accounts/pablocb2303@gmail.com" -folder-hook $folder 'source ~/.mutt/accounts/pablocb2303@gmail.com' - -#source "~/.mutt/outlook.muttrc" -#folder-hook $folder 'source ~/.mutt/outlook.muttrc' - -macro index,pager <f2> '<sync-mailbox><enter-command>source ~/.mutt/accounts/' +macro index,pager <f2> '<enter-command>source ~/.mutt/accounts/.rc^B^B^B' +macro index,pager <f3> "\ +<enter-command>source ~/.mutt/accounts/pablocb2303@gmail.com.rc<enter>\ +<enter-command>source ~/.mutt/accounts/pablo.cardenas@imca.edu.pe.rc<enter>\ +<enter-command>source ~/.mutt/accounts/pcardenasb@uni.edu.pe.rc<enter>\ +<enter-command>source ~/.mutt/accounts/pcardenasb@uni.pe.rc<enter>\ +" diff --git a/linux/.mutt/sidebar.rc b/linux/.mutt/sidebar.rc @@ -0,0 +1,116 @@ +# This is a complete list of sidebar-related configuration. + +# -------------------------------------------------------------------------- +# VARIABLES - shown with their default values +# -------------------------------------------------------------------------- + +# Should the Sidebar be shown? +set sidebar_visible = no + +# How wide should the Sidebar be in screen columns? +# Note: Some characters, e.g. Chinese, take up two columns each. +set sidebar_width = 20 + +# Should the mailbox paths be abbreviated? +set sidebar_short_path = no + +# When abbreviating mailbox path names, use any of these characters as path +# separators. Only the part after the last separators will be shown. +# For file folders '/' is good. For IMAP folders, often '.' is useful. +set sidebar_delim_chars = '/.' + +# If the mailbox path is abbreviated, should it be indented? +set sidebar_folder_indent = no + +# Indent mailbox paths with this string. +set sidebar_indent_string = ' ' + +# Make the Sidebar only display mailboxes that contain new, or flagged, +# mail. +set sidebar_new_mail_only = no + +# Any mailboxes that are whitelisted will always be visible, even if the +# sidebar_new_mail_only option is enabled. +sidebar_whitelist '/home/user/mailbox1' +sidebar_whitelist '/home/user/mailbox2' + +# When searching for mailboxes containing new mail, should the search wrap +# around when it reaches the end of the list? +set sidebar_next_new_wrap = no + +# The character to use as the divider between the Sidebar and the other Mutt +# panels. +# Note: Only the first character of this string is used. +set sidebar_divider_char = '|' + +# Enable extended buffy mode to calculate total, new, and flagged +# message counts for each mailbox. +set mail_check_stats + +# Display the Sidebar mailboxes using this format string. +set sidebar_format = '%B%?F? [%F]?%* %?N?%N/?%S' + +# Sort the mailboxes in the Sidebar using this method: +# count - total number of messages +# flagged - number of flagged messages +# new - number of new messages +# path - mailbox path +# unsorted - do not sort the mailboxes +set sidebar_sort_method = 'unsorted' + +# -------------------------------------------------------------------------- +# FUNCTIONS - shown with an example mapping +# -------------------------------------------------------------------------- + +# Move the highlight to the previous mailbox +bind index,pager \Cp sidebar-prev + +# Move the highlight to the next mailbox +bind index,pager \Cn sidebar-next + +# Open the highlighted mailbox +bind index,pager \Co sidebar-open + +# Move the highlight to the previous page +# This is useful if you have a LOT of mailboxes. +bind index,pager <F3> sidebar-page-up + +# Move the highlight to the next page +# This is useful if you have a LOT of mailboxes. +bind index,pager <F4> sidebar-page-down + +# Move the highlight to the previous mailbox containing new, or flagged, +# mail. +bind index,pager <F5> sidebar-prev-new + +# Move the highlight to the next mailbox containing new, or flagged, mail. +bind index,pager <F6> sidebar-next-new + +# Toggle the visibility of the Sidebar. +bind index,pager B sidebar-toggle-visible + +# -------------------------------------------------------------------------- +# COLORS - some unpleasant examples are given +# -------------------------------------------------------------------------- +# Note: All color operations are of the form: +# color OBJECT FOREGROUND BACKGROUND + +# Color of the current, open, mailbox +# Note: This is a general Mutt option which colors all selected items. +color indicator cyan black + +# Color of the highlighted, but not open, mailbox. +color sidebar_highlight black color8 + +# Color of the divider separating the Sidebar from Mutt panels +color sidebar_divider color8 black + +# Color to give mailboxes containing flagged mail +color sidebar_flagged red black + +# Color to give mailboxes containing new mail +color sidebar_new green black + +# -------------------------------------------------------------------------- + +# vim: syntax=muttrc diff --git a/linux/.mutt/tokens/.gitattributes b/linux/.mutt/tokens/.gitattributes @@ -0,0 +1 @@ +*.gpg diff=gpg diff --git a/linux/.mutt/tokens/pablo.cardenas@imca.edu.pe.gpg b/linux/.mutt/tokens/pablo.cardenas@imca.edu.pe.gpg Binary files differ. diff --git a/linux/.mutt/tokens/pablocb2303@gmail.com.gpg b/linux/.mutt/tokens/pablocb2303@gmail.com.gpg Binary files differ. diff --git a/linux/.mutt/tokens/pcardenasb@uni.edu.pe.gpg b/linux/.mutt/tokens/pcardenasb@uni.edu.pe.gpg Binary files differ. diff --git a/linux/.mutt/tokens/pcardenasb@uni.pe.gpg b/linux/.mutt/tokens/pcardenasb@uni.pe.gpg Binary files differ.