karelzak / mutt-kz

mutt-kz is DEPRECATED in favor of neomutt project.
https://neomutt.org
Other
296 stars 51 forks source link

Changable folder display format in sidebar #59

Open ckruse opened 10 years ago

ckruse commented 10 years ago

It would be great to have something like a sidebar_folder_format variable to be able to change the display style.

noctuid commented 10 years ago

+1 Mutt-kz is missing some of the sidebar settings. The current sidebar patch has sidebar_format (as well as sidebar_folderindent and sidebar_shortpath).

flatcap commented 8 years ago

@ckruse "sidebar_format" is exactly what you need. There's a new version of Mutt-KZ (1.6.0.1) which includes a much improved version of Sidebar.

There's a guide to formatting in the Sidebar Intro: http://www.neomutt.org/sidebar-intro.html#intro-sidebar-format

LMariachi commented 8 years ago

sidebar_format is not working for me. I have

# --- Sidebar ---
#
set sidebar_width=42
set sidebar_visible=yes
set sidebar_divider_char='│'
set sidebar_sort_method=alpha
set sidebar_short_path                  # Shorten mailbox names
set sidebar_delim_chars="./"            # Delete everything up to the last specified character(s)
set sidebar_folder_indent               # Indent folders whose names we've shortened
set sidebar_indent_string=" "           # Indent with one space
set sidebar_format='%B%?F? [%F]?%* %?N?%N/?%S'

That format string is the default, but even setting it explicitly produces only the mailbox name and nothing else. Color highlighting of boxes with new/flagged messages does work.

Related, is there a sidebar_sort_method for case-insensitive alphabetic? Or, failing that, a way to manually set the order? Neomutt currently has an open bug described as "Unsorted isn't" that may be pertinent but that's not very descriptive.

flatcap commented 8 years ago

@LMariachi Hmm... Your config works for me (not that you want to hear that).

Can you try setting each component separately: (do they display the correct numbers?)

set sidebar_format='%F'
set sidebar_format='%N'
set sidebar_format='%S'

I'll have a look at the code, have a think and get back to you.

Related, is there a sidebar_sort_method for case-insensitive alphabetic?

No, there isn't. I'll change Sidebar to make that the default.

Or, failing that, a way to manually set the order?

It's simpler than that. Sidebar will display the folders in the order of the mailboxes command in your config. As long as sidebar_sort_method isn't set, they will stay in that order.

Neomutt currently has an open bug described as "Unsorted isn't" that may be pertinent but that's not very descriptive.

That's just a sarcastic comment directed at myself. When Sidebar sorts the mailboxes, it does it in a way that can't be undone. If you then set sidebar_sort_method = unsorted, nothing will change. You can still sort the mailboxes in a new way, you just can't get back the original order.