NeoMutt  2024-10-02-34-g9dd811
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
config.c File Reference

Config used by libsidebar. More...

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

Go to the source code of this file.

Functions

bool config_init_sidebar (struct ConfigSet *cs)
 Register sidebar config variables - Implements module_init_config_t -.
 

Variables

static const struct Mapping SortSidebarMethods []
 Sort methods for the sidebar.
 
static const struct ExpandoDefinition SidebarFormatDef []
 Expando definitions.
 
static struct ConfigDef SidebarVars []
 Config definitions for the sidebar.
 

Detailed Description

Config used by libsidebar.

Authors
  • Aditya De Saha
  • Pietro Cerutti
  • 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

◆ SortSidebarMethods

const struct Mapping SortSidebarMethods[]
static
Initial value:
= {
{ "path", SORT_PATH },
{ "alpha", SORT_PATH },
{ "name", SORT_PATH },
{ "count", SORT_COUNT },
{ "desc", SORT_DESC },
{ "flagged", SORT_FLAGGED },
{ "unsorted", SORT_ORDER },
{ "mailbox-order", SORT_ORDER },
{ "unread", SORT_UNREAD },
{ "new", SORT_UNREAD },
{ NULL, 0 },
}
@ SORT_ORDER
Sort by the order the messages appear in the mailbox.
Definition: sort2.h:40
@ SORT_PATH
Sort by the folder's path.
Definition: sort2.h:53
@ SORT_FLAGGED
Sort by the number of flagged emails.
Definition: sort2.h:52
@ SORT_DESC
Sort by the folder's description.
Definition: sort2.h:55
@ SORT_COUNT
Sort by number of emails in a folder.
Definition: sort2.h:50
@ SORT_UNREAD
Sort by the number of unread emails.
Definition: sort2.h:51

Sort methods for the sidebar.

Definition at line 42 of file config.c.

◆ SidebarFormatDef

const struct ExpandoDefinition SidebarFormatDef[]
static
Initial value:
= {
{ "!", "flagged", ED_SIDEBAR, ED_SID_FLAGGED, E_TYPE_STRING, NULL },
{ "a", "notify", ED_SIDEBAR, ED_SID_NOTIFY, E_TYPE_NUMBER, NULL },
{ "B", "name", ED_SIDEBAR, ED_SID_NAME, E_TYPE_STRING, NULL },
{ "d", "deleted-count", ED_SIDEBAR, ED_SID_DELETED_COUNT, E_TYPE_NUMBER, NULL },
{ "D", "description", ED_SIDEBAR, ED_SID_DESCRIPTION, E_TYPE_STRING, NULL },
{ "F", "flagged-count", ED_SIDEBAR, ED_SID_FLAGGED_COUNT, E_TYPE_NUMBER, NULL },
{ "L", "limited-count", ED_SIDEBAR, ED_SID_LIMITED_COUNT, E_TYPE_NUMBER, NULL },
{ "n", "new-mail", ED_SIDEBAR, ED_SID_NEW_MAIL, E_TYPE_STRING, NULL },
{ "N", "unread-count", ED_SIDEBAR, ED_SID_UNREAD_COUNT, E_TYPE_NUMBER, NULL },
{ "o", "old-count", ED_SIDEBAR, ED_SID_OLD_COUNT, E_TYPE_NUMBER, NULL },
{ "p", "poll", ED_SIDEBAR, ED_SID_POLL, E_TYPE_NUMBER, NULL },
{ "r", "read-count", ED_SIDEBAR, ED_SID_READ_COUNT, E_TYPE_NUMBER, NULL },
{ "S", "message-count", ED_SIDEBAR, ED_SID_MESSAGE_COUNT, E_TYPE_NUMBER, NULL },
{ "t", "tagged-count", ED_SIDEBAR, ED_SID_TAGGED_COUNT, E_TYPE_NUMBER, NULL },
{ "Z", "unseen-count", ED_SIDEBAR, ED_SID_UNSEEN_COUNT, E_TYPE_NUMBER, NULL },
{ NULL, NULL, 0, -1, -1, NULL }
}
@ E_TYPE_STRING
Data is a string.
Definition: definition.h:37
@ E_TYPE_NUMBER
Data is numeric.
Definition: definition.h:38
@ ED_SIDEBAR
Sidebar ED_SID_ ExpandoDataSidebar.
Definition: domain.h:54
@ ED_GLOBAL
Global ED_GLO_ ExpandoDataGlobal.
Definition: domain.h:44
struct ExpandoNode * node_padding_parse(const char *str, int did, int uid, ExpandoParserFlags flags, const char **parsed_until, struct ExpandoParseError *err)
Parse a Padding Expando - Implements ExpandoDefinition::parse() -.
Definition: node_padding.c:234
@ ED_SID_FLAGGED_COUNT
Mailbox.msg_flagged.
Definition: private.h:61
@ ED_SID_READ_COUNT
Mailbox.msg_count, Mailbox.msg_unread.
Definition: private.h:69
@ ED_SID_DESCRIPTION
Mailbox.name.
Definition: private.h:59
@ ED_SID_NEW_MAIL
Mailbox.has_new.
Definition: private.h:65
@ ED_SID_UNSEEN_COUNT
Mailbox.msg_new.
Definition: private.h:72
@ ED_SID_POLL
Mailbox.poll_new_mail.
Definition: private.h:68
@ ED_SID_OLD_COUNT
Mailbox.msg_unread, Mailbox.msg_new.
Definition: private.h:67
@ ED_SID_MESSAGE_COUNT
Mailbox.msg_count.
Definition: private.h:63
@ ED_SID_LIMITED_COUNT
Mailbox.vcount.
Definition: private.h:62
@ ED_SID_UNREAD_COUNT
Mailbox.msg_unread.
Definition: private.h:71
@ ED_SID_TAGGED_COUNT
Mailbox.msg_tagged.
Definition: private.h:70
@ ED_SID_NOTIFY
Mailbox.notify_user.
Definition: private.h:66
@ ED_SID_NAME
SbEntry.box.
Definition: private.h:64
@ ED_SID_DELETED_COUNT
Mailbox.msg_deleted.
Definition: private.h:58
@ ED_SID_FLAGGED
Mailbox.msg_flagged.
Definition: private.h:60
@ ED_GLO_PADDING_EOL
Padding to end-of-line.
Definition: uid.h:36
@ ED_GLO_PADDING_HARD
Hard Padding.
Definition: uid.h:37
@ ED_GLO_PADDING_SOFT
Soft Padding.
Definition: uid.h:38

Expando definitions.

Config:

  • $sidebar_format

Definition at line 64 of file config.c.

◆ SidebarVars

struct ConfigDef SidebarVars[]
static

Config definitions for the sidebar.

Definition at line 91 of file config.c.