Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature][search view] add config option to format search results | column based layout #23

Closed
0x64746b opened this issue Aug 18, 2011 · 5 comments
Labels

Comments

@0x64746b
Copy link
Collaborator

e.g.:

${num_mails_in_thread} ${subject} ${from} ${tags} ${timestamp}

or maybe make the search view column based as well (cf issue #18) and make the order of the columns configurable?

@pazz
Copy link
Owner

pazz commented Aug 19, 2011

Damn you and your columns! :P

I think that configuring the order of the widgets in threadlines could be don with something like
a custom markdown syntax. For instance, a config option threadline_display could look like

threadline_display = <timestamp> <taglist> <authors> <subject> <body>

We'd have to define these keywords and read and respect the config in widgets.ThreadlineWidget
Go for it :)

@0x64746b
Copy link
Collaborator Author

yeah, actually I don't like that idea that much anymore. I think swappable columns is what /me really wants! duckcover*
I'm afraid I'm really into that whole alignment stuff sry :/

@pazz
Copy link
Owner

pazz commented Aug 19, 2011

right, but 'swappable columns' would have to be defined in a similar manner. cf. the displayed_headers option

@pazz
Copy link
Owner

pazz commented Dec 14, 2011

possibly a better idea is to format this with a hook that takes a dict of possible colums
(name->widget) and sorts it to a list, maybe add a fixed width integer.. like this:

#user defined format hook
def threadline_format(columns, **kwargs):
    return [
       ( columns['timestamp'], 10, 10, 0)  # timestamp widget, min width=10, max width=10, no weight
       ( columns['tags'], 0, -1, 0.5, 0)  # no min width, max width=-1 (as much as needed), no weight
       ( columns['authors'], 0, None, 0.5)  # no min or max width, takes half of remaining space
       ( columns['subject'], 0, None, 0.5)  # takes other half of remaining space
    ]

@pazz
Copy link
Owner

pazz commented Jan 27, 2017

actually something like this can be simulated with fixed width fields in threadline theming (see e.g. th 'mutt' theme in the extras). I'm closing this here.

@pazz pazz closed this as completed Jan 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants