NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
config.c
Go to the documentation of this file.
1
24
30
31
#include "config.h"
32
#include <stdbool.h>
// IWYU pragma: keep
33
#include <stddef.h>
34
#include "
mutt/lib.h
"
35
#include "
config/lib.h
"
36
#include "
expando/lib.h
"
// IWYU pragma: keep
37
38
extern
const
struct
ExpandoDefinition
IndexFormatDef
[];
39
43
struct
ConfigDef
PagerVars
[] = {
44
// clang-format off
45
{
"allow_ansi"
,
DT_BOOL
,
false
, 0, NULL,
46
"Allow ANSI color codes in rich text messages"
47
},
48
{
"display_filter"
,
DT_STRING
|
D_STRING_COMMAND
, 0, 0, NULL,
49
"External command to pre-process an email before display"
50
},
51
{
"header_color_partial"
,
DT_BOOL
,
false
, 0, NULL,
52
"Only color the part of the header matching the regex"
53
},
54
{
"markers"
,
DT_BOOL
,
true
, 0, NULL,
55
"Display a '+' at the beginning of wrapped lines in the pager"
56
},
57
{
"pager"
,
DT_STRING
|
D_STRING_COMMAND
, 0, 0, NULL,
58
"External command for viewing messages, or empty to use NeoMutt's"
59
},
60
{
"pager_context"
,
DT_NUMBER
|
D_INTEGER_NOT_NEGATIVE
, 0, 0, NULL,
61
"Number of lines of overlap when changing pages in the pager"
62
},
63
{
"pager_format"
,
DT_EXPANDO
,
IP
"-%Z- %C/%m: %-20.20n %s%* -- (%P)"
,
IP
&
IndexFormatDef
, NULL,
64
"printf-like format string for the pager's status bar"
65
},
66
{
"pager_index_lines"
,
DT_NUMBER
|
D_INTEGER_NOT_NEGATIVE
, 0, 0, NULL,
67
"Number of index lines to display above the pager"
68
},
69
{
"pager_read_delay"
,
DT_NUMBER
|
D_INTEGER_NOT_NEGATIVE
, 0, 0, NULL,
70
"Number of seconds to wait before marking a message read"
71
},
72
{
"pager_skip_quoted_context"
,
DT_NUMBER
|
D_INTEGER_NOT_NEGATIVE
, 0, 0, NULL,
73
"Lines of context to show when skipping quoted text"
74
},
75
{
"pager_stop"
,
DT_BOOL
,
false
, 0, NULL,
76
"Don't automatically open the next message when at the end of a message"
77
},
78
{
"prompt_after"
,
DT_BOOL
,
true
, 0, NULL,
79
"Pause after running an external pager"
80
},
81
{
"search_context"
,
DT_NUMBER
|
D_INTEGER_NOT_NEGATIVE
, 0, 0, NULL,
82
"Context to display around search matches"
83
},
84
{
"smart_wrap"
,
DT_BOOL
,
true
, 0, NULL,
85
"Wrap text at word boundaries"
86
},
87
{
"smileys"
,
DT_REGEX
,
IP
"(>From )|(:[-^]?[][)(><}{|/DP])"
, 0, NULL,
88
"Regex to match smileys to prevent mistakes when quoting text"
89
},
90
{
"tilde"
,
DT_BOOL
,
false
, 0, NULL,
91
"Display '~' in the pager after the end of the email"
92
},
93
{
"toggle_quoted_show_levels"
,
DT_NUMBER
|
D_INTEGER_NOT_NEGATIVE
, 0, 0, NULL,
94
"Number of quote levels to show with toggle-quoted"
95
},
96
97
{
"skip_quoted_offset"
,
DT_SYNONYM
,
IP
"pager_skip_quoted_context"
,
IP
"2021-06-18"
},
98
99
{ NULL },
100
// clang-format on
101
};
102
111
const
char
*
pager_get_pager
(
struct
ConfigSubset
*sub)
112
{
113
const
char
*c_pager =
cs_subset_string
(sub,
"pager"
);
114
if
(!c_pager ||
mutt_str_equal
(c_pager,
"builtin"
))
115
return
NULL;
116
117
return
c_pager;
118
}
IndexFormatDef
const struct ExpandoDefinition IndexFormatDef[]
Expando definitions.
Definition
mutt_config.c:312
cs_subset_string
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
Definition
helpers.c:291
lib.h
Convenience wrapper for the config headers.
IP
#define IP
Definition
set.h:55
lib.h
Parse Expando string.
lib.h
Convenience wrapper for the library headers.
mutt_str_equal
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Definition
string.c:666
pager_get_pager
const char * pager_get_pager(struct ConfigSubset *sub)
Get the value of $pager.
Definition
config.c:111
PagerVars
struct ConfigDef PagerVars[]
Config definitions for the Pager.
Definition
config.c:43
ConfigDef
Definition
set.h:65
ConfigSubset
A set of inherited config items.
Definition
subset.h:46
ExpandoDefinition
Definition of a format string.
Definition
definition.h:49
D_STRING_COMMAND
#define D_STRING_COMMAND
A command.
Definition
types.h:99
DT_NUMBER
@ DT_NUMBER
a number
Definition
types.h:38
DT_BOOL
@ DT_BOOL
boolean option
Definition
types.h:32
DT_SYNONYM
@ DT_SYNONYM
synonym for another variable
Definition
types.h:45
DT_STRING
@ DT_STRING
a string
Definition
types.h:44
DT_EXPANDO
@ DT_EXPANDO
an expando
Definition
types.h:34
DT_REGEX
@ DT_REGEX
regular expressions
Definition
types.h:41
D_INTEGER_NOT_NEGATIVE
#define D_INTEGER_NOT_NEGATIVE
Negative numbers are not allowed.
Definition
types.h:101