aboutsummaryrefslogtreecommitdiffstats
path: root/config/columns.go
Commit message (Collapse)AuthorAgeFilesLines
* config: add columns based index formatRobin Jarry2023-01-061-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The index-format option comes from mutt and is neither user friendly, nor intuitive. Introduce a new way of configuring the message list contents. Replace index-format with multiple settings to make everything more intuitive. Reuse the table widget added in the previous commit. index-columns Comma-separated list of column names followed by optional alignment and width specifiers. column-separator String separator between columns. column-$name One setting for every name defined in index-columns. This supports golang text/template syntax and allows access to the same message information than before and much more. When index-format is still defined in aerc.conf (which will most likely happen when users will update after this patch), convert it to the new index-columns + column-$name and column-separator system and a warning is displayed on startup so that users are aware that they need to update their config. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* ui: add reusable table widgetRobin Jarry2023-01-041-0/+120
This will be used by the message list index and by the status line. A table is constructed from rows/width dimensions, a list of column definitions and a column separator. Provide functions to parse column definitions from ini config files. This will be used in the next commit. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>