📄 init.h
字号:
/* * Copyright (C) 1996-2002 Michael R. Elkins <me@mutt.org> * Copyright (C) 2004 g10 Code GmbH * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef _MAKEDOC# include "config.h"#else# include "sort.h"#endif#include "buffy.h"#ifndef _MAKEDOC#define DT_MASK 0x0f#define DT_BOOL 1 /* boolean option */#define DT_NUM 2 /* a number */#define DT_STR 3 /* a string */#define DT_PATH 4 /* a pathname */#define DT_QUAD 5 /* quad-option (yes/no/ask-yes/ask-no) */#define DT_SORT 6 /* sorting methods */#define DT_RX 7 /* regular expressions */#define DT_MAGIC 8 /* mailbox type */#define DT_SYN 9 /* synonym for another variable */#define DT_ADDR 10 /* e-mail address */#define DTYPE(x) ((x) & DT_MASK)/* subtypes */#define DT_SUBTYPE_MASK 0xf0#define DT_SORT_ALIAS 0x10#define DT_SORT_BROWSER 0x20#define DT_SORT_KEYS 0x40#define DT_SORT_AUX 0x80/* flags to parse_set() */#define M_SET_INV (1<<0) /* default is to invert all vars */#define M_SET_UNSET (1<<1) /* default is to unset all vars */#define M_SET_RESET (1<<2) /* default is to reset all vars to default *//* forced redraw/resort types */#define R_NONE 0#define R_INDEX (1<<0)#define R_PAGER (1<<1)#define R_RESORT (1<<2) /* resort the mailbox */#define R_RESORT_SUB (1<<3) /* resort subthreads */#define R_RESORT_INIT (1<<4) /* resort from scratch */#define R_TREE (1<<5) /* redraw the thread tree */#define R_BOTH (R_INDEX | R_PAGER)#define R_RESORT_BOTH (R_RESORT | R_RESORT_SUB)struct option_t{ char *option; short type; short flags; unsigned long data; unsigned long init; /* initial value */};#define UL (unsigned long)#endif /* _MAKEDOC */#ifndef ISPELL#define ISPELL "ispell"#endif/* build complete documentation */#ifdef _MAKEDOC# ifndef USE_IMAP# define USE_IMAP# endif# ifndef MIXMASTER# define MIXMASTER "mixmaster"# endif# ifndef USE_POP# define USE_POP# endif# ifndef USE_SSL_OPENSSL# define USE_SSL_OPENSSL# endif# ifndef USE_SSL_GNUTLS# define USE_SSL_GNUTLS# endif# ifndef USE_SSL# define USE_SSL# endif# ifndef USE_SOCKET# define USE_SOCKET# endif# ifndef USE_DOTLOCK# define USE_DOTLOCK# endif# ifndef DL_STANDALONE# define DL_STANDALONE# endif# ifndef USE_HCACHE# define USE_HCACHE# endif# ifndef HAVE_LIBIDN# define HAVE_LIBIDN# endif# ifndef HAVE_GETADDRINFO# define HAVE_GETADDRINFO# endif#endifstruct option_t MuttVars[] = { /*++*/ { "abort_nosubject", DT_QUAD, R_NONE, OPT_SUBJECT, M_ASKYES }, /* ** .pp ** If set to \fIyes\fP, when composing messages and no subject is given ** at the subject prompt, composition will be aborted. If set to ** \fIno\fP, composing messages with no subject given at the subject ** prompt will never be aborted. */ { "abort_unmodified", DT_QUAD, R_NONE, OPT_ABORT, M_YES }, /* ** .pp ** If set to \fIyes\fP, composition will automatically abort after ** editing the message body if no changes are made to the file (this ** check only happens after the \fIfirst\fP edit of the file). When set ** to \fIno\fP, composition will never be aborted. */ { "alias_file", DT_PATH, R_NONE, UL &AliasFile, UL "~/.muttrc" }, /* ** .pp ** The default file in which to save aliases created by the ** ``$create-alias'' function. ** .pp ** \fBNote:\fP Mutt will not automatically source this file; you must ** explicitly use the ``$source'' command for it to be executed. */ { "alias_format", DT_STR, R_NONE, UL &AliasFmt, UL "%4n %2f %t %-10a %r" }, /* ** .pp ** Specifies the format of the data displayed for the `alias' menu. The ** following printf(3)-style sequences are available: ** .pp ** .dl ** .dt %a .dd alias name ** .dt %f .dd flags - currently, a "d" for an alias marked for deletion ** .dt %n .dd index number ** .dt %r .dd address which alias expands to ** .dt %t .dd character which indicates if the alias is tagged for inclusion ** .de */ { "allow_8bit", DT_BOOL, R_NONE, OPTALLOW8BIT, 1 }, /* ** .pp ** Controls whether 8-bit data is converted to 7-bit using either Quoted- ** Printable or Base64 encoding when sending mail. */ { "allow_ansi", DT_BOOL, R_NONE, OPTALLOWANSI, 0 }, /* ** .pp ** Controls whether ANSI color codes in messages (and color tags in ** rich text messages) are to be interpreted. ** Messages containing these codes are rare, but if this option is set, ** their text will be colored accordingly. Note that this may override ** your color choices, and even present a security problem, since a ** message could include a line like "[-- PGP output follows ..." and ** give it the same color as your attachment color. */ { "arrow_cursor", DT_BOOL, R_BOTH, OPTARROWCURSOR, 0 }, /* ** .pp ** When set, an arrow (``->'') will be used to indicate the current entry ** in menus instead of highlighting the whole line. On slow network or modem ** links this will make response faster because there is less that has to ** be redrawn on the screen when moving to the next or previous entries ** in the menu. */ { "ascii_chars", DT_BOOL, R_BOTH, OPTASCIICHARS, 0 }, /* ** .pp ** If set, Mutt will use plain ASCII characters when displaying thread ** and attachment trees, instead of the default \fIACS\fP characters. */ { "askbcc", DT_BOOL, R_NONE, OPTASKBCC, 0 }, /* ** .pp ** If set, Mutt will prompt you for blind-carbon-copy (Bcc) recipients ** before editing an outgoing message. */ { "askcc", DT_BOOL, R_NONE, OPTASKCC, 0 }, /* ** .pp ** If set, Mutt will prompt you for carbon-copy (Cc) recipients before ** editing the body of an outgoing message. */ { "attach_format", DT_STR, R_NONE, UL &AttachFormat, UL "%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] " }, /* ** .pp ** This variable describes the format of the `attachment' menu. The ** following printf-style sequences are understood: ** .pp ** .dl ** .dt %C .dd charset ** .dt %c .dd requires charset conversion (n or c) ** .dt %D .dd deleted flag ** .dt %d .dd description ** .dt %e .dd MIME content-transfer-encoding ** .dt %f .dd filename ** .dt %I .dd disposition (I=inline, A=attachment) ** .dt %m .dd major MIME type ** .dt %M .dd MIME subtype ** .dt %n .dd attachment number ** .dt %Q .dd "Q", if MIME part qualifies for attachment counting ** .dt %s .dd size ** .dt %t .dd tagged flag ** .dt %T .dd graphic tree characters ** .dt %u .dd unlink (=to delete) flag ** .dt %X .dd number of qualifying MIME parts in this part and its children ** (please see the ``$attachments'' section for possible speed effects) ** .dt %>X .dd right justify the rest of the string and pad with character "X" ** .dt %|X .dd pad to the end of the line with character "X" ** .de */ { "attach_sep", DT_STR, R_NONE, UL &AttachSep, UL "\n" }, /* ** .pp ** The separator to add between attachments when operating (saving, ** printing, piping, etc) on a list of tagged attachments. */ { "attach_split", DT_BOOL, R_NONE, OPTATTACHSPLIT, 1 }, /* ** .pp ** If this variable is unset, when operating (saving, printing, piping, ** etc) on a list of tagged attachments, Mutt will concatenate the ** attachments and will operate on them as a single attachment. The ** ``$$attach_sep'' separator is added after each attachment. When set, ** Mutt will operate on the attachments one by one. */ { "attribution", DT_STR, R_NONE, UL &Attribution, UL "On %d, %n wrote:" }, /* ** .pp ** This is the string that will precede a message which has been included ** in a reply. For a full listing of defined printf()-like sequences see ** the section on ``$$index_format''. */ { "autoedit", DT_BOOL, R_NONE, OPTAUTOEDIT, 0 }, /* ** .pp ** When set along with ``$$edit_headers'', Mutt will skip the initial ** send-menu and allow you to immediately begin editing the body of your ** message. The send-menu may still be accessed once you have finished ** editing the body of your message. ** .pp ** Also see ``$$fast_reply''. */ { "auto_tag", DT_BOOL, R_NONE, OPTAUTOTAG, 0 }, /* ** .pp ** When set, functions in the \fIindex\fP menu which affect a message ** will be applied to all tagged messages (if there are any). When ** unset, you must first use the tag-prefix function (default: ";") to ** make the next function apply to all tagged messages. */ { "beep", DT_BOOL, R_NONE, OPTBEEP, 1 }, /* ** .pp ** When this variable is set, mutt will beep when an error occurs. */ { "beep_new", DT_BOOL, R_NONE, OPTBEEPNEW, 0 }, /* ** .pp ** When this variable is set, mutt will beep whenever it prints a message ** notifying you of new mail. This is independent of the setting of the ** ``$$beep'' variable. */ { "bounce", DT_QUAD, R_NONE, OPT_BOUNCE, M_ASKYES }, /* ** .pp ** Controls whether you will be asked to confirm bouncing messages. ** If set to \fIyes\fP you don't get asked if you want to bounce a ** message. Setting this variable to \fIno\fP is not generally useful, ** and thus not recommended, because you are unable to bounce messages. */ { "bounce_delivered", DT_BOOL, R_NONE, OPTBOUNCEDELIVERED, 1 }, /* ** .pp ** When this variable is set, mutt will include Delivered-To headers when ** bouncing messages. Postfix users may wish to unset this variable. */ { "braille_friendly", DT_BOOL, R_NONE, OPTBRAILLEFRIENDLY, 0 }, /* ** .pp ** When this variable is set, mutt will place the cursor at the beginning ** of the current line in menus, even when the arrow_cursor variable ** is unset, making it easier for blind persons using Braille displays to ** follow these menus. The option is disabled by default because many ** visual terminals don't permit making the cursor invisible. */ { "charset", DT_STR, R_NONE, UL &Charset, UL 0 }, /* ** .pp ** Character set your terminal uses to display and enter textual data. */ { "check_new", DT_BOOL, R_NONE, OPTCHECKNEW, 1 }, /* ** .pp ** \fBNote:\fP this option only affects \fImaildir\fP and \fIMH\fP style ** mailboxes. ** .pp ** When \fIset\fP, Mutt will check for new mail delivered while the ** mailbox is open. Especially with MH mailboxes, this operation can ** take quite some time since it involves scanning the directory and ** checking each file to see if it has already been looked at. If ** \fIcheck_new\fP is \fIunset\fP, no check for new mail is performed ** while the mailbox is open. */ { "collapse_unread", DT_BOOL, R_NONE, OPTCOLLAPSEUNREAD, 1 }, /* ** .pp ** When \fIunset\fP, Mutt will not collapse a thread if it contains any ** unread messages.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -