From 043ae7f4e78d01d43e70c5c4623175ef591c981a Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 24 Oct 2014 13:49:01 -0400 Subject: [PATCH] mutt updates --- .config/mutt/bindings.rc | 2 + .config/mutt/formatting.rc | 64 +++++++++++++++++++++++ .config/mutt/gpg.rc | 7 +-- .config/mutt/lists.rc | 14 +++++ .config/mutt/main.rc | 21 +++++--- .config/mutt/sidebar.rc | 5 +- .config/mutt/theme.screen.rc | 0 .config/mutt/theme/256color.rc | 73 +++++++++++++++++++++++++++ .config/mutt/theme/screen-256color.rc | 1 + 9 files changed, 174 insertions(+), 13 deletions(-) create mode 100644 .config/mutt/formatting.rc create mode 100644 .config/mutt/lists.rc create mode 100644 .config/mutt/theme.screen.rc create mode 100644 .config/mutt/theme/256color.rc create mode 100644 .config/mutt/theme/screen-256color.rc diff --git a/.config/mutt/bindings.rc b/.config/mutt/bindings.rc index d631914..a5a8cdb 100644 --- a/.config/mutt/bindings.rc +++ b/.config/mutt/bindings.rc @@ -7,6 +7,8 @@ bind index X tag-pattern bind index previous-line bind index next-line bind index display-message +bind index collapse-thread +macro index G 'getmail -q -g ~/.config/getmail -r gmail.rc' bind pager previous-line bind pager next-line diff --git a/.config/mutt/formatting.rc b/.config/mutt/formatting.rc new file mode 100644 index 0000000..0d93baa --- /dev/null +++ b/.config/mutt/formatting.rc @@ -0,0 +1,64 @@ +# http://www.mutt.org/doc/devel/manual.html#formatstrings + +# alias_format +# (format of data displayed for the alias menu) +# %a alias name %n index number %r address %t tag-character +# %f flags (d for deleted) +# +#set alias_format="%4n %2f %t %-12a %r" + +# attach_format +# +# (controls the look of the compose and attach menu) +# %c = requires charset conversion (n or c) %C = Charset +# %d = description %D = deleted flag +# %e = MIME content-transfer-encoding %f = filename +# %I = disposition (I=inline, A=attachment) +# %m = major MIME type %M = MIME subtype %n = attachment number +# %s = size %t = tagged flag %T = tree +# %u = unlink +# %>X = right justify and pad with "X" %|X = pad with "X" to end of line +# +#set attach_format="%u%D%t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] " +#set attach_format="%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] " +#set attach_format="%u%D%I %t%4n %T%.80d%> [%.7m/%.20M, %.6e%?C?, %C?, %s] " + +# compose_format +# (Controls the status line of the compose menu) +# %a = number of attachments %h = local hostname +# %l = approx. size of msg %v = Mutt version +# +#set compose_format="-- %v-- Compose [Approximate Message Size: %l Attachments: %a]%>-" # }}} + +# See strftime man page; replaces %d/%D in index_format. +set date_format = "%d %b %Y %H:%M" + +# %C current number %d last modified %f filename +# %F permissions %g group %l number of hard links +# %N "N" if new mail %s size in bytes %t "*" if tagged +# %u owner name %>X right justify the rest and pad with "X" +# %|X pad to the end of the line with character "X" +#set folder_format="%3C %t %N %F %-8.8u %-8.8g %8s %d %f" # file browser menu +#set folder_format="%F %d %8s %N %f" # file browser menu + +# http://www.mutt.org/doc/devel/manual.html#index-format +set index_format = "%5C %Z %?M?»& ?%s %* %B %-20.20n %D" + +#set pager_format="-%Z- %C/%m [%[%H:%M]] %-17.17n %s" + +# %b # of folders with new mail %d # of deleted msgs +# %f mbox path %F # of flagged msgs %h hostname +# %m total# of messages %M # of shown msgs %n # of new msgs +# %l bytes in mbox %L size of limited msgs %o # of old msgs +# %p # of postponed. msgs %P percentage of the display +# %r readonly/changed %s sorting method %S sort_aux method +# %t # of tagged msgs %u # of unread msgs %v Mutt version +# %>X = right justify and pad with "X" %|X = pad with "X" to end of line +# %??? print iff is non zero +# %??&? +# +#set status_format="[%r] %h %f (%s) [%M/%m] [N=%n,*=%t,post=%p,new=%b]" +#set status_format="-%r-%v--[%?M?%M/?%m msgs%?n?, %n new?%?d?, %d del?%?F?, %F flag?%?t?, %t tag?%?p?, %p postp?%?b?, %b inc?%?l?, %l?]--(%f)--%s/%S-%>-%P-" +#set status_format="-%r-%v--[%?M?%M/?%m msgs%?n?, %n new?%?d?, %d del?%?F?, %F flag?%?t?, %t tag?%?p?, %p postp?%?b?, %b inc?%?l?, ?%?L?%L/?%?l?%l?]--(%f)--%s/%S-%>-%P-" +#set status_format="-%r-%v--[%?M?%M/?%m msgs%?n?, %n new?%?d?, %d del?%?F?, %F flag?%?t?, %t tag?%?p?, %p postp?%?b?, %b inc?%?l?, %l?]--(%f)--%s-%>-%P-" +#set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───" diff --git a/.config/mutt/gpg.rc b/.config/mutt/gpg.rc index 931a8b8..f93e3d0 100644 --- a/.config/mutt/gpg.rc +++ b/.config/mutt/gpg.rc @@ -1,4 +1,5 @@ set crypt_autosign = yes +set crypt_replyencrypt = yes set crypt_verify_sig = yes set pgp_auto_decode = yes set pgp_autosign = yes @@ -25,7 +26,7 @@ set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphra set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f" # create a pgp/mime encrypted attachment -#set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" +set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" # create a pgp/mime encrypted and signed attachment set pgp_encrypt_sign_command="pgpewrap gpg %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" @@ -45,8 +46,8 @@ set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --l # read in the secret key ring set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --list-secret-keys %r" -# fetch keys -set pgp_getkeys_command="gpg --recv-key %r" +# fetch keys via e-mail address +#set pgp_getkeys_command # pattern for good signature - may need to be adapted to locale! #set pgp_good_sign="^gpgv?: Good signature from " diff --git a/.config/mutt/lists.rc b/.config/mutt/lists.rc new file mode 100644 index 0000000..b90ce78 --- /dev/null +++ b/.config/mutt/lists.rc @@ -0,0 +1,14 @@ +#subscribe -group oss,gentoo "^gentoo-(announce|dev|embedded|hardened|kernel|perl|portage-dev|science|scm)@lists\.gentoo\.org$" +subscribe -group arch "^(alpha|amd64|arm|arm64|hppa|ia64|m68k|mips|s390|sh|sparc|x86)@gentoo\.org$" +subscribe -group toolchain "@sourceware\.org$" +subscribe -group vger "@vger\.kernel\.org$" +subscribe -group oss \ + "@(lists\.)?sourceforge\.net$" \ + "@openssl\.org$" \ + "@lists\.[a-z0-9.]+\.org$" \ + "^zlib-devel@madler\.net$" \ + "^dropbear@ucc\.asn\.au$" \ + "^gmp-bugs@gmplib\.org$" \ + "^file@mx\.gw\.com$" +subscribe -group gnu "(^bug-.*|-(devel|patches))@(non)?gnu\.org$" "@debbugs\.gnu\.org$" "^(auto(conf|make)|coreutils|libtool)@gnu\.org$" +subscribe -group spec "-l@opengroup\.org$" diff --git a/.config/mutt/main.rc b/.config/mutt/main.rc index 6e0fa46..a8aae54 100644 --- a/.config/mutt/main.rc +++ b/.config/mutt/main.rc @@ -14,27 +14,34 @@ set sleep_time = 0 set time_inc = 500 set user_agent = no +folder-hook . 'push ' +set collapse_flagged = no +set collapse_unread = no set sort = threads set strict_threads = yes set sort_browser = reverse-date set sort_aux = last-date-received set hide_thread_subject = yes #set menu_scroll = yes +set pager_context = 10 set pager_stop = yes +set autoedit = yes +set editor = "nano -r 80" +set fast_reply = yes +set include = yes + ignore * -unignore from date subject to cc +unignore from date subject to cc x-mailing-list list-id unhdr_order * -hdr_order subject from to cc date - -# See strftime man page; replaces %d/%D in index_format. -set date_format = "%d %b %Y %H:%M" -# http://www.mutt.org/doc/devel/manual.html#index-format -set index_format = "%5C %Z %s %> %B %-30.30n %D" +hdr_order subject from to cc date list-id x-mailing-list source ~/.config/mutt/bindings.rc +source ~/.config/mutt/formatting.rc source ~/.config/mutt/sidebar.rc source ~/.config/mutt/gpg.rc +source ~/.config/mutt/lists.rc source ~/.config/mutt/mail.rc source ~/.config/mutt/network.rc source ~/.config/mutt/theme.rc +source ~/.config/mutt/theme/$TERM.rc diff --git a/.config/mutt/sidebar.rc b/.config/mutt/sidebar.rc index a6da36a..051acb8 100644 --- a/.config/mutt/sidebar.rc +++ b/.config/mutt/sidebar.rc @@ -13,6 +13,5 @@ bind pager \Ck sidebar-prev bind pager \Cj sidebar-next bind pager \Co sidebar-open -macro index b 'toggle sidebar_visible' -macro pager b 'toggle sidebar_visible' -bind index B bounce-message +macro index \Cb 'toggle sidebar_visible' +macro pager \Cb 'toggle sidebar_visible' diff --git a/.config/mutt/theme.screen.rc b/.config/mutt/theme.screen.rc new file mode 100644 index 0000000..e69de29 diff --git a/.config/mutt/theme/256color.rc b/.config/mutt/theme/256color.rc new file mode 100644 index 0000000..4ddd0f9 --- /dev/null +++ b/.config/mutt/theme/256color.rc @@ -0,0 +1,73 @@ +# For colorN syntax use the ~scripts/term-colortest to find colors +color normal color250 color232 # normal text +color indicator color232 color215 # color bar over currently selected message +color tree color63 color232 # thread arrows +color status brightcolor245 color236 # status line +color message color245 color232 # info messages +color error color231 color196 # errors +color signature color240 color232 # signature +color attachment color61 color232 # MIME attachments +color search brightcolor226 color196 # search matches +color tilde color63 color232 # ~ at bottom of messages +color markers color37 color232 # + at beginning of wrapped lines +color hdrdefault color240 color232 # default header lines +color bold brightcolor235 color232 # hilighting bold patterns in body +color underline brightcolor240 color232 # hilighting underlined patterns in body + +# Quote colors +color quoted color130 color232 +color quoted1 color25 color232 +color quoted2 color171 color232 +color quoted3 color38 color232 +color quoted4 color100 color232 +color quoted5 color53 color232 +color quoted6 color29 color232 +color quoted7 color127 color232 +color quoted8 color59 color232 +color quoted9 color167 color232 + +# Color for the attribution-line +color body color130 color232 "^[^>].*(wrote|writes|said|say(s)?).*:" +color body color25 color232 "^>[^>].*(wrote|writes|said|say(s)?).*:" +color body color171 color232 "^>[ ]?>[^>].*(wrote|writes|said|say(s)?).*:" +color body color38 color232 "^(>[ ]?){2}>[^>].*(wrote|writes|said|say(s)?).*:" +color body color100 color232 "^(>[ ]?){3}>[^>].*(wrote|writes|said|say(s)?).*:" +color body color89 color232 "^(>[ ]?){4}>[^>].*(wrote|writes|said|say(s)?).*:" +color body color29 color232 "^(>[ ]?){5}>[^>].*(wrote|writes|said|say(s)?).*:" +color body color127 color232 "^(>[ ]?){6}>[^>].*(wrote|writes|said|say(s)?).*:" +color body color59 color232 "^(>[ ]?){7}>[^>].*(wrote|writes|said|say(s)?).*:" +color body color167 color232 "^(>[ ]?){8}>[^>].*(wrote|writes|said|say(s)?).*:" + +# Source index for links +color body color229 color232 "\[[1-9][0-9]*\]" + +# Index +color index color245 color232 ~Q # mail that has been replied to +color index color245 color232 ~R # read mail +color index brightcolor250 color232 "~N | ~U" # New or unread +color index brightcolor49 color232 ~T # Tagged +color index brightcolor196 color232 ~D # Deleted +color index brightcolor34 color232 ~F # Flagged +color index color202 color232 "~z >500K" # Highlight large messages +#color index color232 green ~(~F) # Thread of flagged message +#color index brightcyan default ~p # mail addressed to me (as defined by alternates) +#color index brightblue default ~P # mail from myself (as defined by alternates) + +# Headers +color header color10 color232 "^(From|Subject|Cc|Date|To|Reply-to|X-Spam-Level|User-Agent|X-Mailer):" +#color header red default "^X-DSPAM" + +# Body +color body color12 color232 "(http|https|ftp|news|telnet|finger|irc)://[^ \">\t\r\n]*" +color body color10 color232 "(mailto:)?[-a-z_0-9.]+@[-a-z_0-9.]+" +#color body red default "mailto:" + +color body brightcolor226 color232 "[[:space:]][;:][-][)/|O>(<][[:space:][:cntrl:]]" # smilies +color body brightcolor226 color232 "^[;:][-][)O>(<][[:space:][:cntrl:]]" # smilies +#color body default default "^:.*" # mutt strangely colors these red by default + +# Colors for t-prot +color body color240 color232 "^\\[---.*" +color body color22 color232 "^#v[-+]" + +# vim:ft=muttrc:fdm=marker:ts=4:sw=4: diff --git a/.config/mutt/theme/screen-256color.rc b/.config/mutt/theme/screen-256color.rc new file mode 100644 index 0000000..596d5c2 --- /dev/null +++ b/.config/mutt/theme/screen-256color.rc @@ -0,0 +1 @@ +source ~/.config/mutt/theme/256color.rc -- 2.39.2