NeoMutt  2024-10-02-37-gfa9146
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
status.c
Go to the documentation of this file.
1
35#include "config.h"
36#include <stdbool.h>
37#include <stdio.h>
38#include <sys/types.h>
39#include "mutt/lib.h"
40#include "config/lib.h"
41#include "core/lib.h"
42#include "status.h"
43#include "expando/lib.h"
44#include "index/lib.h"
45#include "menu/lib.h"
46#include "postpone/lib.h"
47#include "globals.h"
48#include "mutt_mailbox.h"
49#include "mutt_thread.h"
50#include "muttlib.h"
51#include "mview.h"
52
53void status_f(const struct ExpandoNode *node, void *data, MuttFormatFlags flags,
54 struct Buffer *buf);
55
57
65static char *get_sort_str(char *buf, size_t buflen, enum SortType method)
66{
67 snprintf(buf, buflen, "%s%s%s", (method & SORT_REVERSE) ? "reverse-" : "",
68 (method & SORT_LAST) ? "last-" : "",
70 return buf;
71}
72
77{
79 struct Menu *menu;
80};
81
85void status_r(const struct ExpandoNode *node, void *data, MuttFormatFlags flags,
86 struct Buffer *buf)
87{
88 const struct MbTable *c_status_chars = cs_subset_mbtable(NeoMutt->sub, "status_chars");
89 if (!c_status_chars || !c_status_chars->len)
90 return;
91
92 const struct MenuStatusLineData *msld = data;
93 const struct IndexSharedData *shared = msld->shared;
94 const struct Mailbox *m = shared->mailbox;
95
96 size_t i = 0;
97
98 if (m)
99 {
100 i = shared->attach_msg ? 3 :
101 ((m->readonly || m->dontwrite) ? 2 :
102 (m->changed ||
103 /* deleted doesn't necessarily mean changed in IMAP */
104 (m->type != MUTT_IMAP && m->msg_deleted)) ?
105 1 :
106 0);
107 }
108
109 if (i >= c_status_chars->len)
110 buf_addstr(buf, c_status_chars->chars[0]);
111 else
112 buf_addstr(buf, c_status_chars->chars[i]);
113}
114
118void status_D(const struct ExpandoNode *node, void *data, MuttFormatFlags flags,
119 struct Buffer *buf)
120{
121 const struct MenuStatusLineData *msld = data;
122 const struct IndexSharedData *shared = msld->shared;
123 const struct Mailbox *m = shared->mailbox;
124
125 // If there's a descriptive name, use it. Otherwise, use %f
126 if (m && m->name)
127 {
128 const char *s = m->name;
129 buf_strcpy(buf, s);
130 return;
131 }
132
133 status_f(node, data, flags, buf);
134}
135
139void status_f(const struct ExpandoNode *node, void *data, MuttFormatFlags flags,
140 struct Buffer *buf)
141{
142 const struct MenuStatusLineData *msld = data;
143 const struct IndexSharedData *shared = msld->shared;
144 const struct Mailbox *m = shared->mailbox;
145
146 char tmp[128] = { 0 };
147
148 if (m && m->compress_info && (m->realpath[0] != '\0'))
149 {
150 mutt_str_copy(tmp, m->realpath, sizeof(tmp));
151 mutt_pretty_mailbox(tmp, sizeof(tmp));
152 }
153 else if (m && (m->type == MUTT_NOTMUCH) && m->name)
154 {
155 mutt_str_copy(tmp, m->name, sizeof(tmp));
156 }
157 else if (m && !buf_is_empty(&m->pathbuf))
158 {
159 mutt_str_copy(tmp, mailbox_path(m), sizeof(tmp));
160 mutt_pretty_mailbox(tmp, sizeof(tmp));
161 }
162 else
163 {
164 mutt_str_copy(tmp, _("(no mailbox)"), sizeof(tmp));
165 }
166
167 buf_strcpy(buf, tmp);
168}
169
173long status_M_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
174{
175 const struct MenuStatusLineData *msld = data;
176 const struct IndexSharedData *shared = msld->shared;
177 const struct Mailbox *m = shared->mailbox;
178
179 return m ? m->vcount : 0;
180}
181
185long status_m_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
186{
187 const struct MenuStatusLineData *msld = data;
188 const struct IndexSharedData *shared = msld->shared;
189 const struct Mailbox *m = shared->mailbox;
190
191 return m ? m->msg_count : 0;
192}
193
197long status_n_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
198{
199 const struct MenuStatusLineData *msld = data;
200 const struct IndexSharedData *shared = msld->shared;
201 const struct Mailbox *m = shared->mailbox;
202
203 return m ? m->msg_new : 0;
204}
205
209long status_o_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
210{
211 const struct MenuStatusLineData *msld = data;
212 const struct IndexSharedData *shared = msld->shared;
213 const struct Mailbox *m = shared->mailbox;
214
215 return m ? (m->msg_unread - m->msg_new) : 0;
216}
217
221long status_d_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
222{
223 const struct MenuStatusLineData *msld = data;
224 const struct IndexSharedData *shared = msld->shared;
225 const struct Mailbox *m = shared->mailbox;
226
227 return m ? m->msg_deleted : 0;
228}
229
233long status_F_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
234{
235 const struct MenuStatusLineData *msld = data;
236 const struct IndexSharedData *shared = msld->shared;
237 const struct Mailbox *m = shared->mailbox;
238
239 return m ? m->msg_flagged : 0;
240}
241
245long status_t_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
246{
247 const struct MenuStatusLineData *msld = data;
248 const struct IndexSharedData *shared = msld->shared;
249 const struct Mailbox *m = shared->mailbox;
250
251 return m ? m->msg_tagged : 0;
252}
253
257long status_p_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
258{
259 const struct MenuStatusLineData *msld = data;
260 const struct IndexSharedData *shared = msld->shared;
261 struct Mailbox *m = shared->mailbox;
262
263 return mutt_num_postponed(m, false);
264}
265
269long status_b_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
270{
271 const struct MenuStatusLineData *msld = data;
272 const struct IndexSharedData *shared = msld->shared;
273 struct Mailbox *m = shared->mailbox;
274
276}
277
281long status_l_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
282{
283 const struct MenuStatusLineData *msld = data;
284 const struct IndexSharedData *shared = msld->shared;
285 const struct Mailbox *m = shared->mailbox;
286 if (!m)
287 return 0;
288
289 return m->size;
290}
291
295void status_l(const struct ExpandoNode *node, void *data, MuttFormatFlags flags,
296 struct Buffer *buf)
297{
298 const struct MenuStatusLineData *msld = data;
299 const struct IndexSharedData *shared = msld->shared;
300 const struct Mailbox *m = shared->mailbox;
301
302 char tmp[128] = { 0 };
303
304 const off_t num = m ? m->size : 0;
305 mutt_str_pretty_size(tmp, sizeof(tmp), num);
306 buf_strcpy(buf, tmp);
307}
308
312void status_T(const struct ExpandoNode *node, void *data, MuttFormatFlags flags,
313 struct Buffer *buf)
314{
315 const enum UseThreads c_use_threads = mutt_thread_style();
316 const char *s = get_use_threads_str(c_use_threads);
317 buf_strcpy(buf, s);
318}
319
323void status_s(const struct ExpandoNode *node, void *data, MuttFormatFlags flags,
324 struct Buffer *buf)
325{
326 char tmp[128] = { 0 };
327
328 const enum SortType c_sort = cs_subset_sort(NeoMutt->sub, "sort");
329 const char *s = get_sort_str(tmp, sizeof(tmp), c_sort);
330 buf_strcpy(buf, s);
331}
332
336void status_S(const struct ExpandoNode *node, void *data, MuttFormatFlags flags,
337 struct Buffer *buf)
338{
339 char tmp[128] = { 0 };
340
341 const enum SortType c_sort_aux = cs_subset_sort(NeoMutt->sub, "sort_aux");
342 const char *s = get_sort_str(tmp, sizeof(tmp), c_sort_aux);
343 buf_strcpy(buf, s);
344}
345
349long status_P_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
350{
351 const struct MenuStatusLineData *msld = data;
352 const struct Menu *menu = msld->menu;
353 if (!menu)
354 return 0;
355
356 if (menu->top + menu->page_len >= menu->max)
357 return 100;
358
359 return (100 * (menu->top + menu->page_len)) / menu->max;
360}
361
365void status_P(const struct ExpandoNode *node, void *data, MuttFormatFlags flags,
366 struct Buffer *buf)
367{
368 const struct MenuStatusLineData *msld = data;
369 const struct Menu *menu = msld->menu;
370 if (!menu)
371 return;
372
373 char tmp[128] = { 0 };
374
375 char *cp = NULL;
376 if (menu->top + menu->page_len >= menu->max)
377 {
378 cp = menu->top ?
379 /* L10N: Status bar message: the end of the list emails is visible in the index */
380 _("end") :
381 /* L10N: Status bar message: all the emails are visible in the index */
382 _("all");
383 }
384 else
385 {
386 int count = (100 * (menu->top + menu->page_len)) / menu->max;
387 /* L10N: Status bar, percentage of way through index.
388 `%d` is the number, `%%` is the percent symbol.
389 They may be reordered, or space inserted, if you wish. */
390 snprintf(tmp, sizeof(tmp), _("%d%%"), count);
391 cp = tmp;
392 }
393
394 buf_strcpy(buf, cp);
395}
396
400void status_h(const struct ExpandoNode *node, void *data, MuttFormatFlags flags,
401 struct Buffer *buf)
402{
403 const char *s = ShortHostname;
404 buf_strcpy(buf, s);
405}
406
410long status_L_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
411{
412 const struct MenuStatusLineData *msld = data;
413 const struct IndexSharedData *shared = msld->shared;
414 const struct MailboxView *mailbox_view = shared->mailbox_view;
415 if (!mailbox_view)
416 return 0;
417
418 return mailbox_view->vsize;
419}
420
424void status_L(const struct ExpandoNode *node, void *data, MuttFormatFlags flags,
425 struct Buffer *buf)
426{
427 const struct MenuStatusLineData *msld = data;
428 const struct IndexSharedData *shared = msld->shared;
429 const struct MailboxView *mailbox_view = shared->mailbox_view;
430
431 char tmp[128] = { 0 };
432
433 const off_t num = mailbox_view ? mailbox_view->vsize : 0;
434 mutt_str_pretty_size(tmp, sizeof(tmp), num);
435 buf_strcpy(buf, tmp);
436}
437
441long status_R_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
442{
443 const struct MenuStatusLineData *msld = data;
444 const struct IndexSharedData *shared = msld->shared;
445 const struct Mailbox *m = shared->mailbox;
446
447 return m ? (m->msg_count - m->msg_unread) : 0;
448}
449
453long status_u_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
454{
455 const struct MenuStatusLineData *msld = data;
456 const struct IndexSharedData *shared = msld->shared;
457 const struct Mailbox *m = shared->mailbox;
458
459 return m ? m->msg_unread : 0;
460}
461
465void status_v(const struct ExpandoNode *node, void *data, MuttFormatFlags flags,
466 struct Buffer *buf)
467{
468 const char *s = mutt_make_version();
469 buf_strcpy(buf, s);
470}
471
475void status_V(const struct ExpandoNode *node, void *data, MuttFormatFlags flags,
476 struct Buffer *buf)
477{
478 const struct MenuStatusLineData *msld = data;
479 const struct IndexSharedData *shared = msld->shared;
480 const struct MailboxView *mailbox_view = shared->mailbox_view;
481
482 const char *s = mview_has_limit(mailbox_view) ? mailbox_view->pattern : "";
483 buf_strcpy(buf, s);
484}
485
496void menu_status_line(struct Buffer *buf, struct IndexSharedData *shared,
497 struct Menu *menu, int max_cols, const struct Expando *exp)
498{
499 struct MenuStatusLineData data = { shared, menu };
500
501 expando_filter(exp, StatusRenderData, &data, MUTT_FORMAT_NO_FLAGS, max_cols, buf);
502}
503
509const struct ExpandoRenderData StatusRenderData[] = {
510 // clang-format off
527 { ED_GLOBAL, ED_GLO_SORT, status_s, NULL },
534 { -1, -1, NULL, NULL },
535 // clang-format on
536};
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
Definition: buffer.c:291
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
Definition: buffer.c:226
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
Definition: buffer.c:395
void mutt_pretty_mailbox(char *buf, size_t buflen)
Shorten a mailbox path using '~' or '='.
Definition: muttlib.c:440
struct MbTable * cs_subset_mbtable(const struct ConfigSubset *sub, const char *name)
Get a Multibyte table config item by name.
Definition: helpers.c:119
short cs_subset_sort(const struct ConfigSubset *sub, const char *name)
Get a sort config item by name.
Definition: helpers.c:266
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
Definition: mailbox.h:223
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
Definition: mailbox.h:51
@ MUTT_IMAP
'IMAP' Mailbox type
Definition: mailbox.h:50
@ 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
int expando_filter(const struct Expando *exp, const struct ExpandoRenderData *rdata, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Render an Expando and run the result through a filter.
Definition: filter.c:138
Parse Expando string.
char * ShortHostname
Short version of the hostname.
Definition: globals.c:38
Global variables.
long status_p_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of postponed messages - Implements ExpandoRenderData::get_number() -.
Definition: status.c:257
long status_b_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of mailboxes with new mail - Implements ExpandoRenderData::get_number() -.
Definition: status.c:269
long status_R_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of read messages - Implements ExpandoRenderData::get_number() -.
Definition: status.c:441
long status_d_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of deleted messages - Implements ExpandoRenderData::get_number() -.
Definition: status.c:221
long status_o_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of old messages - Implements ExpandoRenderData::get_number() -.
Definition: status.c:209
long status_t_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of tagged messages - Implements ExpandoRenderData::get_number() -.
Definition: status.c:245
long status_n_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of new messages - Implements ExpandoRenderData::get_number() -.
Definition: status.c:197
long status_m_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of messages in the mailbox - Implements ExpandoRenderData::get_number() -.
Definition: status.c:185
long status_F_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of flagged messages - Implements ExpandoRenderData::get_number() -.
Definition: status.c:233
long status_P_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Percentage through index - Implements ExpandoRenderData::get_number() -.
Definition: status.c:349
long status_u_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of unread messages - Implements ExpandoRenderData::get_number() -.
Definition: status.c:453
long status_M_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of messages - Implements ExpandoRenderData::get_number() -.
Definition: status.c:173
long status_l_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Size of the current mailbox - Implements ExpandoRenderData::get_number() -.
Definition: status.c:281
long status_L_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Size of the messages - Implements ExpandoRenderData::get_number() -.
Definition: status.c:410
void status_r(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Modified/read-only flag - Implements ExpandoRenderData::get_string() -.
Definition: status.c:85
void status_T(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Current threading mode - Implements ExpandoRenderData::get_string() -.
Definition: status.c:312
void status_s(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Sorting mode - Implements ExpandoRenderData::get_string() -.
Definition: status.c:323
void status_l(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Size of the current mailbox - Implements ExpandoRenderData::get_string() -.
Definition: status.c:295
void status_D(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Description of the mailbox - Implements ExpandoRenderData::get_string() -.
Definition: status.c:118
void status_L(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Size of the messages - Implements ExpandoRenderData::get_string() -.
Definition: status.c:424
void status_h(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Local hostname - Implements ExpandoRenderData::get_string() -.
Definition: status.c:400
void status_f(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: pathname of the mailbox - Implements ExpandoRenderData::get_string() -.
Definition: status.c:139
void status_v(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Version string - Implements ExpandoRenderData::get_string() -.
Definition: status.c:465
void status_S(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Aux sorting method - Implements ExpandoRenderData::get_string() -.
Definition: status.c:336
void status_V(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Active limit pattern - Implements ExpandoRenderData::get_string() -.
Definition: status.c:475
void status_P(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Percentage through index - Implements ExpandoRenderData::get_string() -.
Definition: status.c:365
GUI manage the main index (list of emails)
@ 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
const char * mutt_map_get_name(int val, const struct Mapping *map)
Lookup a string for a constant.
Definition: mapping.c:42
GUI present the user with a selectable list.
@ ED_MEN_PERCENTAGE
Menu.top, ...
Definition: lib.h:68
Convenience wrapper for the library headers.
#define _(a)
Definition: message.h:28
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
Definition: string.c:581
int mutt_mailbox_check(struct Mailbox *m_cur, CheckStatsFlags flags)
Check all all Mailboxes for new mail.
Definition: mutt_mailbox.c:169
Mailbox helper functions.
const char * get_use_threads_str(enum UseThreads value)
Convert UseThreads enum to string.
Definition: mutt_thread.c:100
enum UseThreads mutt_thread_style(void)
Which threading style is active?
Definition: mutt_thread.c:82
Create/manipulate threading in emails.
UseThreads
Which threading style is active, $use_threads.
Definition: mutt_thread.h:97
const char * mutt_make_version(void)
Generate the NeoMutt version string.
Definition: muttlib.c:858
void mutt_str_pretty_size(char *buf, size_t buflen, size_t num)
Display an abbreviated size, like 3.4K.
Definition: muttlib.c:1004
Some miscellaneous functions.
bool mview_has_limit(const struct MailboxView *mv)
Is a limit active?
Definition: mview.c:439
View of a Mailbox.
#define MUTT_MAILBOX_CHECK_NO_FLAGS
No flags are set.
Definition: mxapi.h:53
Postponed Emails.
int mutt_num_postponed(struct Mailbox *m, bool force)
Return the number of postponed messages.
Definition: postpone.c:70
#define MUTT_FORMAT_NO_FLAGS
No flags are set.
Definition: render.h:33
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
Definition: render.h:32
const struct Mapping SortMethods[]
Sort methods for '$sort' for the index.
Definition: mutt_config.c:88
#define SORT_MASK
Mask for the sort id.
Definition: sort2.h:70
#define SORT_LAST
Sort thread by last-X, e.g. received date.
Definition: sort2.h:72
SortType
Methods for sorting.
Definition: sort2.h:34
#define SORT_REVERSE
Reverse the order of the sort.
Definition: sort2.h:71
const struct ExpandoRenderData StatusRenderData[]
Callbacks for Status Expandos.
Definition: status.c:56
static char * get_sort_str(char *buf, size_t buflen, enum SortType method)
Get the sort method as a string.
Definition: status.c:65
void menu_status_line(struct Buffer *buf, struct IndexSharedData *shared, struct Menu *menu, int max_cols, const struct Expando *exp)
Create the status line.
Definition: status.c:496
GUI display a user-configurable status line.
String manipulation buffer.
Definition: buffer.h:36
Basic Expando Node.
Definition: node.h:67
Parsed Expando trees.
Definition: expando.h:41
Data shared between Index, Pager and Sidebar.
Definition: shared_data.h:37
struct Mailbox * mailbox
Current Mailbox.
Definition: shared_data.h:41
bool attach_msg
Are we in "attach message" mode?
Definition: shared_data.h:46
struct MailboxView * mailbox_view
Current Mailbox view.
Definition: shared_data.h:40
View of a Mailbox.
Definition: mview.h:40
struct Menu * menu
Needed for pattern compilation.
Definition: mview.h:47
off_t vsize
Size (in bytes) of the messages shown.
Definition: mview.h:41
char * pattern
Limit pattern string.
Definition: mview.h:42
A mailbox.
Definition: mailbox.h:79
int vcount
The number of virtual messages.
Definition: mailbox.h:99
bool changed
Mailbox has been modified.
Definition: mailbox.h:110
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
Definition: mailbox.h:81
int msg_new
Number of new messages.
Definition: mailbox.h:92
int msg_count
Total number of messages.
Definition: mailbox.h:88
enum MailboxType type
Mailbox type.
Definition: mailbox.h:102
char * name
A short name for the Mailbox.
Definition: mailbox.h:82
struct Buffer pathbuf
Path of the Mailbox.
Definition: mailbox.h:80
int msg_deleted
Number of deleted messages.
Definition: mailbox.h:93
bool dontwrite
Don't write the mailbox on close.
Definition: mailbox.h:111
off_t size
Size of the Mailbox.
Definition: mailbox.h:84
int msg_flagged
Number of flagged messages.
Definition: mailbox.h:90
void * compress_info
Compressed mbox module private data.
Definition: mailbox.h:121
bool readonly
Don't allow changes to the mailbox.
Definition: mailbox.h:116
int msg_tagged
How many messages are tagged?
Definition: mailbox.h:94
int msg_unread
Number of unread messages.
Definition: mailbox.h:89
Multibyte character table.
Definition: mbtable.h:36
int len
Number of characters.
Definition: mbtable.h:38
char ** chars
The array of multibyte character strings.
Definition: mbtable.h:39
Data for creating a Menu line.
Definition: status.c:77
struct IndexSharedData * shared
Data shared between Index, Pager and Sidebar.
Definition: status.c:78
struct Menu * menu
Current Menu.
Definition: status.c:79
Definition: lib.h:79
int top
Entry that is the top of the current page.
Definition: lib.h:90
int max
Number of entries in the menu.
Definition: lib.h:81
int page_len
Number of entries per screen.
Definition: lib.h:84
Container for Accounts, Notifications.
Definition: neomutt.h:42
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:46
@ ED_GLO_SORT
Value of $sort.
Definition: uid.h:40
@ ED_GLO_VERSION
NeoMutt version.
Definition: uid.h:43
@ ED_GLO_USE_THREADS
Value of $use_threads.
Definition: uid.h:42
@ ED_GLO_HOSTNAME
Local hostname.
Definition: uid.h:35
@ ED_GLO_SORT_AUX
Value of $sort_aux.
Definition: uid.h:41