index_format

Dennis Preiser dp-mutt at d--p.de
Tue Jul 26 17:38:45 UTC 2022


On Tue, Jul 26, 2022 at 04:53:28PM +0200, Fourhundred Thecat wrote:
> I have following index_format:
> 
>  index_format="%{%Y-%b-%d %H:%M} %?X?(%X)&  ? %-25.25F  %.96s %> %5c"
> 
> I would like to make following change to the last column, where message
> size is shown:
> 
> 1) if message size is less than 0.1M, show empty column
> 2) if message size is more than 0.1M show message size, but always in
> megabytes (not kilobytes)
> 
> can somebody please advise how to do this?

You could try something like this:

set size_show_mb
index-format-hook size_flags "~z -1M" "     "
index-format-hook size_flags "~z >1M" "%5c"
index_format="%{%Y-%b-%d %H:%M} %?X?(%X)&  ? %-25.25F  %.96s %> %@size_flags@"

Dennis


More information about the Mutt-users mailing list