NeoMutt  2025-09-05-43-g177ed6
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
config.c File Reference

Config used by libindex. More...

#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "expando/lib.h"
#include "menu/lib.h"
#include "shared_data.h"
+ Include dependency graph for config.c:

Go to the source code of this file.

Functions

bool config_init_index (struct ConfigSet *cs)
 Register index config variables - Implements module_init_config_t -.
 

Variables

const struct ExpandoDefinition StatusFormatDef []
 Expando definitions.
 
static struct ConfigDef IndexVars []
 Config definitions for the Index.
 

Detailed Description

Config used by libindex.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file config.c.

Variable Documentation

◆ StatusFormatDef

const struct ExpandoDefinition StatusFormatDef[]

Expando definitions.

Config:

  • $new_mail_command
  • $status_format
  • $ts_icon_format
  • $ts_status_format

Definition at line 47 of file config.c.

47 {
48 // clang-format off
49 { "*", "padding-soft", ED_GLOBAL, ED_GLO_PADDING_SOFT, node_padding_parse },
50 { ">", "padding-hard", ED_GLOBAL, ED_GLO_PADDING_HARD, node_padding_parse },
51 { "|", "padding-eol", ED_GLOBAL, ED_GLO_PADDING_EOL, node_padding_parse },
52 { "b", "unread-mailboxes", ED_INDEX, ED_IND_UNREAD_MAILBOXES, NULL },
53 { "d", "deleted-count", ED_INDEX, ED_IND_DELETED_COUNT, NULL },
54 { "D", "description", ED_INDEX, ED_IND_DESCRIPTION, NULL },
55 { "f", "mailbox-path", ED_INDEX, ED_IND_MAILBOX_PATH, NULL },
56 { "F", "flagged-count", ED_INDEX, ED_IND_FLAGGED_COUNT, NULL },
57 { "h", "hostname", ED_GLOBAL, ED_GLO_HOSTNAME, NULL },
58 { "l", "mailbox-size", ED_INDEX, ED_IND_MAILBOX_SIZE, NULL },
59 { "L", "limit-size", ED_INDEX, ED_IND_LIMIT_SIZE, NULL },
60 { "m", "message-count", ED_INDEX, ED_IND_MESSAGE_COUNT, NULL },
61 { "M", "limit-count", ED_INDEX, ED_IND_LIMIT_COUNT, NULL },
62 { "n", "new-count", ED_INDEX, ED_IND_NEW_COUNT, NULL },
63 { "o", "old-count", ED_INDEX, ED_IND_OLD_COUNT, NULL },
64 { "p", "postponed-count", ED_INDEX, ED_IND_POSTPONED_COUNT, NULL },
65 { "P", "percentage", ED_MENU, ED_MEN_PERCENTAGE, NULL },
66 { "r", "readonly", ED_INDEX, ED_IND_READONLY, NULL },
67 { "R", "read-count", ED_INDEX, ED_IND_READ_COUNT, NULL },
68 { "s", "sort", ED_GLOBAL, ED_GLO_CONFIG_SORT, NULL },
69 { "S", "sort-aux", ED_GLOBAL, ED_GLO_CONFIG_SORT_AUX, NULL },
70 { "t", "tagged-count", ED_INDEX, ED_IND_TAGGED_COUNT, NULL },
71 { "T", "use-threads", ED_GLOBAL, ED_GLO_CONFIG_USE_THREADS, NULL },
72 { "u", "unread-count", ED_INDEX, ED_IND_UNREAD_COUNT, NULL },
73 { "v", "version", ED_GLOBAL, ED_GLO_VERSION, NULL },
74 { "V", "limit-pattern", ED_INDEX, ED_IND_LIMIT_PATTERN, NULL },
75 { NULL, NULL, 0, -1, NULL }
76 // clang-format on
77};
@ ED_MENU
Menu ED_MEN_ ExpandoDataMenu.
Definition domain.h:48
@ ED_GLOBAL
Global ED_GLO_ ExpandoDataGlobal.
Definition domain.h:44
@ ED_INDEX
Index ED_IND_ ExpandoDataIndex.
Definition domain.h:46
struct ExpandoNode * node_padding_parse(const char *str, struct ExpandoFormat *fmt, int did, int uid, ExpandoParserFlags flags, const char **parsed_until, struct ExpandoParseError *err)
Parse a Padding Expando - Implements ExpandoDefinition::parse() -.
@ ED_IND_LIMIT_COUNT
Mailbox.vcount.
Definition shared_data.h:59
@ ED_IND_MAILBOX_PATH
Mailbox.pathbuf, Mailbox.name.
Definition shared_data.h:62
@ ED_IND_DELETED_COUNT
Mailbox.msg_deleted.
Definition shared_data.h:56
@ ED_IND_NEW_COUNT
Mailbox.msg_new.
Definition shared_data.h:65
@ ED_IND_MAILBOX_SIZE
Mailbox.size.
Definition shared_data.h:63
@ ED_IND_LIMIT_PATTERN
MailboxView.pattern.
Definition shared_data.h:60
@ ED_IND_READ_COUNT
Mailbox.msg_count, Mailbox.msg_unread.
Definition shared_data.h:69
@ ED_IND_POSTPONED_COUNT
mutt_num_postponed()
Definition shared_data.h:67
@ ED_IND_FLAGGED_COUNT
Mailbox.msg_flagged.
Definition shared_data.h:58
@ ED_IND_MESSAGE_COUNT
Mailbox.msg_count.
Definition shared_data.h:64
@ ED_IND_OLD_COUNT
Mailbox.msg_unread, Mailbox.msg_new.
Definition shared_data.h:66
@ ED_IND_READONLY
Mailbox.readonly, Mailbox.dontwrite.
Definition shared_data.h:68
@ ED_IND_UNREAD_COUNT
Mailbox.msg_unread.
Definition shared_data.h:71
@ ED_IND_TAGGED_COUNT
Mailbox.msg_tagged.
Definition shared_data.h:70
@ ED_IND_LIMIT_SIZE
MailboxView.vsize.
Definition shared_data.h:61
@ ED_IND_DESCRIPTION
Mailbox.name.
Definition shared_data.h:57
@ ED_IND_UNREAD_MAILBOXES
Mailbox, mutt_mailbox_check()
Definition shared_data.h:72
@ ED_MEN_PERCENTAGE
Menu.top, ...
Definition lib.h:68
@ ED_GLO_CONFIG_USE_THREADS
Value of $use_threads.
Definition uid.h:36
@ ED_GLO_PADDING_EOL
Padding to end-of-line.
Definition uid.h:38
@ ED_GLO_CONFIG_SORT
Value of $sort.
Definition uid.h:34
@ ED_GLO_VERSION
NeoMutt version.
Definition uid.h:42
@ ED_GLO_PADDING_HARD
Hard Padding.
Definition uid.h:39
@ ED_GLO_PADDING_SOFT
Soft Padding.
Definition uid.h:40
@ ED_GLO_CONFIG_SORT_AUX
Value of $sort_aux.
Definition uid.h:35
@ ED_GLO_HOSTNAME
Local hostname.
Definition uid.h:37

◆ IndexVars

struct ConfigDef IndexVars[]
static
Initial value:
= {
{ "change_folder_next", DT_BOOL, false, 0, NULL,
"Suggest the next folder, rather than the first when using '<change-folder>'"
},
{ "collapse_all", DT_BOOL, false, 0, NULL,
"Collapse all threads when entering a folder"
},
{ "mark_macro_prefix", DT_STRING, IP "'", 0, NULL,
"Prefix for macros using '<mark-message>'"
},
{ "status_format", DT_EXPANDO|D_L10N_STRING, IP N_("-%r-NeoMutt: %D [Msgs:%<M?%M/>%m%<n? New:%n>%<o? Old:%o>%<d? Del:%d>%<F? Flag:%F>%<t? Tag:%t>%<p? Post:%p>%<b? Inc:%b>%<l? %l>]---(%<T?%T/>%s/%S)-%>-(%P)---"), IP &StatusFormatDef, NULL,
"printf-like format string for the index's status line"
},
{ "uncollapse_jump", DT_BOOL, false, 0, NULL,
"When opening a thread, jump to the next unread message"
},
{ "uncollapse_new", DT_BOOL, true, 0, NULL,
"Open collapsed threads when new mail arrives"
},
{ NULL },
}
#define IP
Definition set.h:52
const struct ExpandoDefinition StatusFormatDef[]
Expando definitions.
Definition config.c:47
#define N_(a)
Definition message.h:32
#define D_L10N_STRING
String can be localised.
Definition types.h:81
@ DT_BOOL
boolean option
Definition types.h:32
@ DT_STRING
a string
Definition types.h:44
@ DT_EXPANDO
an expando
Definition types.h:34

Config definitions for the Index.

Definition at line 82 of file config.c.

82 {
83 // clang-format off
84 { "change_folder_next", DT_BOOL, false, 0, NULL,
85 "Suggest the next folder, rather than the first when using '<change-folder>'"
86 },
87 { "collapse_all", DT_BOOL, false, 0, NULL,
88 "Collapse all threads when entering a folder"
89 },
90 { "mark_macro_prefix", DT_STRING, IP "'", 0, NULL,
91 "Prefix for macros using '<mark-message>'"
92 },
93 // L10N: $status_format default format
94 { "status_format", DT_EXPANDO|D_L10N_STRING, IP N_("-%r-NeoMutt: %D [Msgs:%<M?%M/>%m%<n? New:%n>%<o? Old:%o>%<d? Del:%d>%<F? Flag:%F>%<t? Tag:%t>%<p? Post:%p>%<b? Inc:%b>%<l? %l>]---(%<T?%T/>%s/%S)-%>-(%P)---"), IP &StatusFormatDef, NULL,
95 "printf-like format string for the index's status line"
96 },
97 { "uncollapse_jump", DT_BOOL, false, 0, NULL,
98 "When opening a thread, jump to the next unread message"
99 },
100 { "uncollapse_new", DT_BOOL, true, 0, NULL,
101 "Open collapsed threads when new mail arrives"
102 },
103 { NULL },
104 // clang-format on
105};