X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=hooks;h=83728ae5b29ad1c2e64ac31d10951039166c5393;hb=8e465934df1d083afec4686d7d3917338c4164c3;hp=df31fc2f87cedaf51c1fb7c4d3d542dc10995e58;hpb=df37e63431530c2535e9c3d2ee6b6d88059832d7;p=mutt.git diff --git a/hooks b/hooks index df31fc2..83728ae 100644 --- a/hooks +++ b/hooks @@ -1,13 +1,9 @@ -folder-hook . "set sort=date-received" - -folder-hook . "set index_format='%{%F %T} %Z %-25.25s %-24.24a %4.4c'" - -# I don't really need to see the "From" in my sent -# folder. "To" is probably a bit more useful. -folder-hook sent "set index_format='%{%F %T} %Z %-25.25s %-24.24t %4.4c'" - -# Sort any mailing list messages by thread. -# This assumes, of course, that all of your -# mailing list messages are stored under /lists/. -folder-hook ^lists/ "set sort=threads" - +# The "33" is a magic number, totaling the number of characters in the +# non-subject/author fields. +# +# We need a special rule for the "Sent" folder so it shows the "To" +# address instead of the "From" address. +# +folder-hook .*[sS]ent.* 'set my_col_from = `echo $((30 * ($(tput cols)-33) / 100))`; set my_col_subject = `echo $((70 * ($(tput cols)-33) / 100))`; set index_format="%D | %Z %-$my_col_from.${my_col_from}t %-$my_col_subject.${my_col_subject}s (%-4.4c)"' + +folder-hook ! .*[sS]ent.* 'set my_col_from = `echo $((30 * ($(tput cols)-33) / 100))`; set my_col_subject = `echo $((70 * ($(tput cols)-33) / 100))`; set index_format="%D | %Z %-$my_col_from.${my_col_from}F %-$my_col_subject.${my_col_subject}s (%-4.4c)"'