forked from neomutt/neomutt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
manual.xml.head
21224 lines (20226 loc) · 823 KB
/
manual.xml.head
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" standalone="no"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!--
vim: ts=2 sw=2 sts=2 expandtab:
-->
<book>
<bookinfo>
<title>The NeoMutt E-Mail Client</title>
<author>
<firstname>Richard</firstname>
<surname>Russon</surname>
<email>rich@flatcap.org</email>
</author>
<releaseinfo>version @VERSION@</releaseinfo>
<abstract>
<para>
<quote>Teaching an old dog new tricks</quote>
</para>
</abstract>
</bookinfo>
<chapter id="intro">
<title>Introduction</title>
<para>
<emphasis role="bold">NeoMutt</emphasis> is a small but very powerful
text-based MIME mail client. NeoMutt is highly configurable, and is well
suited to the mail power user with advanced features like key bindings,
keyboard macros, mail threading, regular expression searches and
a powerful pattern matching language for selecting groups of messages.
</para>
<sect1 id="homepage">
<title>NeoMutt Home Page</title>
<para>
The homepage can be found at
<ulink url="https://neomutt.org">https://neomutt.org</ulink>.
</para>
</sect1>
<sect1 id="mailinglists">
<title>Mailing Lists</title>
<itemizedlist>
<listitem>
<para>
<email>neomutt-users@neomutt.org</email> – help, bug reports and
feature requests. To subscribe to this list, please send a mail to
<email>neomutt-users-request@neomutt.org</email> with the subject
"subscribe".
</para>
</listitem>
<listitem>
<para>
<email>neomutt-devel@neomutt.org</email> – development mailing
list. To subscribe to this list, please send a mail to
<email>neomutt-devel-request@neomutt.org</email> with the subject
"subscribe".
</para>
</listitem>
</itemizedlist>
</sect1>
<sect1 id="irc">
<title>NeoMutt Online Resources</title>
<variablelist>
<varlistentry>
<term>Issue Tracking System</term>
<listitem>
<para>
Bugs may be reported on the devel mailing list, or on GitHub:
<ulink url="https://github.com/neomutt/neomutt/issues">https://github.com/neomutt/neomutt/issues</ulink>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>IRC</term>
<listitem>
<para>
For the IRC user community, visit channel
<emphasis>#neomutt</emphasis> on
<ulink url="https://web.libera.chat/#neomutt">irc.libera.chat</ulink>.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect1>
<sect1 id="contrib">
<title>Contributing to NeoMutt</title>
<para>
There are various ways to contribute to the NeoMutt project.
</para>
<para>
Especially for new users it may be helpful to meet other new and
experienced users to chat about NeoMutt, talk about problems and share
tricks.
</para>
<para>
Since translations of NeoMutt into other languages are highly
appreciated, the NeoMutt developers always look for skilled translators
that help improve and continue to maintain stale translations.
</para>
<para>
For contributing code patches for new features and bug fixes,
please refer to the developer pages at
<ulink url="https://neomutt.org/dev.html">https://neomutt.org/dev.html</ulink>
for more details.
</para>
</sect1>
<sect1 id="typo">
<title>Typographical Conventions</title>
<para>
This section lists typographical conventions followed throughout this
manual. See table <xref linkend="tab-typo" /> for typographical
conventions for special terms.
</para>
<table id="tab-typo">
<title>Typographical conventions for special terms</title>
<tgroup cols="2">
<thead>
<row>
<entry>Item</entry>
<entry>Refers to...</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>printf(3)</literal></entry>
<entry>
UNIX manual pages, execute <literal>man 3 printf</literal>
</entry>
</row>
<row>
<entry><literal><PageUp></literal></entry>
<entry>
named keys
</entry>
</row>
<row>
<entry><literal><create-alias></literal></entry>
<entry>
named NeoMutt function
</entry>
</row>
<row>
<entry><literal>^G</literal></entry>
<entry>
Control+G key combination
</entry>
</row>
<row>
<entry>$mail_check</entry>
<entry>
NeoMutt configuration option
</entry>
</row>
<row>
<entry><literal>$HOME</literal></entry>
<entry>
environment variable
</entry>
</row>
</tbody>
</tgroup>
</table>
<para>
Examples are presented as:
</para>
<screen>neomutt -v</screen>
<para>
Within command synopsis, curly brackets (<quote>{}</quote>) denote
a set of options of which one is mandatory, square brackets
(<quote>[]</quote>) denote optional arguments, three dots denote that
the argument may be repeated arbitrary times.
</para>
</sect1>
<sect1 id="copyright">
<title>Copyright</title>
<para>
NeoMutt is Copyright © 2015-2024 Richard Russon
<email>rich@flatcap.org</email> and friends.
</para>
<para>
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.
</para>
<para>
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.
</para>
<para>
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.
</para>
</sect1>
</chapter>
<chapter id="gettingstarted">
<title>Getting Started</title>
<para>
This section is intended as a brief overview of how to use NeoMutt.
There are many other features which are described elsewhere in the
manual. There is even more information available in the NeoMutt FAQ and
various web pages. See the
<ulink url="https://neomutt.org">NeoMutt homepage</ulink> for more
details.
</para>
<para>
The keybindings described in this section are the defaults as
distributed. Your local system administrator may have altered the
defaults for your site. You can always type <quote>?</quote> in any menu
to display the current bindings.
</para>
<para>
The first thing you need to do is invoke NeoMutt, simply by typing
<literal>neomutt</literal> at the command line. There are various
command-line options, see either the NeoMutt man page or the
<link linkend="commandline">reference</link>.
</para>
<sect1 id="core-concepts">
<title>Core Concepts</title>
<para>
NeoMutt is a text-based application which interacts with users through
different menus which are mostly line-/entry-based or page-based.
A line-based menu is the so-called <quote>index</quote> menu (listing
all messages of the currently opened folder) or the
<quote>alias</quote> menu (allowing you to select recipients from
a list). Examples for page-based menus are the <quote>pager</quote>
(showing one message at a time) or the <quote>help</quote> menu listing
all available key bindings.
</para>
<para>
The user interface consists of a context sensitive help line at the
top, the menu's contents followed by a context sensitive status line
and finally the command line. The command line is used to display
informational and error messages as well as for prompts and for
entering interactive commands.
</para>
<para>
NeoMutt is configured through variables which, if the user wants to
permanently use a non-default value, are written to configuration
files. NeoMutt supports a rich config file syntax to make even complex
configuration files readable and commentable.
</para>
<para>
Because NeoMutt allows for customizing almost all key bindings, there
are so-called <quote>functions</quote> which can be executed manually
(using the command line) or in macros. Macros allow the user to bind
a sequence of commands to a single key or a short key sequence instead
of repeating a sequence of actions over and over.
</para>
<para>
Many commands (such as saving or copying a message to another folder)
can be applied to a single message or a set of messages (so-called
<quote>tagged</quote> messages). To help selecting messages, NeoMutt
provides a rich set of message patterns (such as recipients, sender,
body contents, date sent/received, etc.) which can be combined into
complex expressions using the boolean <emphasis>and</emphasis> and
<emphasis>or</emphasis> operations as well as negating. These patterns
can also be used to (for example) search for messages or to limit the
index to show only matching messages.
</para>
<para>
NeoMutt supports a <quote>hook</quote> concept which allows the user to
execute arbitrary configuration commands and functions in certain
situations such as entering a folder, starting a new message or
replying to an existing one. These hooks can be used to highly
customize NeoMutt's behavior including managing multiple identities,
customizing the display for a folder or even implementing
auto-archiving based on a per-folder basis and much more.
</para>
<para>
Besides an interactive mode, NeoMutt can also be used as a command-line
tool to send messages. See
<xref linkend="tab-commandline-options" /> for a complete list of
command-line options.
</para>
</sect1>
<sect1 id="concept-screens-and-menus">
<title>Screens and Menus</title>
<sect2 id="intro-index">
<title>Index</title>
<para>
The index is the screen that you usually see first when you start
NeoMutt. It gives an overview over your emails in the currently
opened mailbox. By default, this is your system mailbox. The
information you see in the index is a list of emails, each with its
number on the left, its flags (new email, important email, email that
has been forwarded or replied to, tagged email, ...), the date when
email was sent, its sender, the email size, and the subject.
Additionally, the index also shows thread hierarchies: when you reply
to an email, and the other person replies back, you can see the other
person's email in a "sub-tree" below. This is especially useful for
personal email between a group of people or when you've subscribed to
mailing lists.
</para>
</sect2>
<sect2 id="intro-pager">
<title>Pager</title>
<para>
The pager is responsible for showing the email content. On the top of
the pager you have an overview over the most important email headers
like the sender, the recipient, the subject, and much more
information. How much information you actually see depends on your
configuration, which we'll describe below.
</para>
<para>
Below the headers, you see the email body which usually contains the
message. If the email contains any attachments, you will see more
information about them below the email body, or, if the attachments
are text files, you can view them directly in the pager.
</para>
<para>
To give the user a good overview, it is possible to configure NeoMutt
to show different things in the pager with different colors.
Virtually everything that can be described with a regular expression
can be colored, e.g. URLs, email addresses or smileys.
</para>
</sect2>
<sect2 id="intro-browser">
<title>File Browser</title>
<para>
The file browser is the interface to the local or remote file system.
When selecting a mailbox to open, the browser allows custom sorting
of items, limiting the items shown by a regular expression and
a freely adjustable format of what to display in which way. It also
allows for easy navigation through the file system when selecting
file(s) to attach to a message, select multiple files to attach and
many more.
</para>
<para>
Some mail systems can nest mail folders inside other mail folders.
The normal open entry commands in NeoMutt will open the mail folder and
you can't see the sub-folders. If you instead use the
<literal><descend-directory></literal> function it will go into
the directory and not open it as a mail directory.
</para>
</sect2>
<sect2 id="intro-sidebar">
<title>Sidebar</title>
<para>
The Sidebar shows a list of all your mailboxes. The list can be
turned on and off, it can be themed and the list style can be
configured.
</para>
<para>
This part of the manual is suitable for beginners. If you already
know NeoMutt you could skip ahead to the main
<link linkend="sidebar">Sidebar guide</link>. If you just want to get
started, you could use the sample
<link linkend="sidebar-neomuttrc">Sidebar neomuttrc</link>.
</para>
<para>
To check if NeoMutt supports <quote>Sidebar</quote>, look for the
string <literal>+sidebar</literal> in the neomutt version.
</para>
<screen>neomutt -v</screen>
<para>
<emphasis role="bold">Let's turn on the Sidebar:</emphasis>
</para>
<screen>
set sidebar_visible
set sidebar_format = "%B%<F? [%F]>%* %<N?%N/>%S"
set mail_check_stats
</screen>
<para>
You will see something like this. A list of mailboxes on the left.
A list of emails, from the selected mailbox, on the right.
</para>
<screen>
<emphasis role="indicator">Fruit [1] 3/8</emphasis>| 1 + Jan 24 Rhys Lee (192) Yew
Animals [1] 2/6| 2 + Feb 11 Grace Hall (167) Ilama
Cars 4| 3 Feb 23 Aimee Scott (450) Nectarine
Seas 1/7| 4 ! Feb 28 Summer Jackson (264) Lemon
| 5 Mar 07 Callum Harrison (464) Raspberry
|<emphasis role="indicator"> 6 N + Mar 24 Samuel Harris (353) Tangerine </emphasis>
| 7 N + Sep 05 Sofia Graham (335) Cherry
| 8 N Sep 16 Ewan Brown (105) Ugli
|
|
</screen>
<para>
This user has four mailboxes: <quote>Fruit</quote>,
<quote>Cars</quote>, <quote>Animals</quote> and <quote>Seas</quote>.
</para>
<para>
The current, open, mailbox is <quote>Fruit</quote>. We can also see
information about the other mailboxes. For example: The
<quote>Animals</quote> mailbox contains, 1 flagged email, 2 new
emails out of a total of 6 emails.
</para>
<sect3 id="intro-sidebar-navigation">
<title>Navigation</title>
<para>
The Sidebar adds some new
<link linkend="sidebar-functions">functions</link> to NeoMutt.
</para>
<para>
The user pressed the <quote>c</quote> key to
<literal><change-folder></literal> to the
<quote>Animals</quote> mailbox. The Sidebar automatically updated
the indicator to match.
</para>
<screen>
Fruit [1] 3/8| 1 Jan 03 Tia Gibson (362) Caiman
<emphasis role="indicator">Animals [1] 2/6</emphasis>| 2 + Jan 22 Rhys Lee ( 48) Dolphin
Cars 4| 3 ! Aug 16 Ewan Brown (333) Hummingbird
Seas 1/7| 4 Sep 25 Grace Hall ( 27) Capybara
|<emphasis role="indicator"> 5 N + Nov 12 Evelyn Rogers (453) Tapir </emphasis>
| 6 N + Nov 16 Callum Harrison (498) Hedgehog
|
|
|
|
</screen>
<para>
Let's map some functions:
</para>
<screen>
bind index,pager \CP sidebar-prev <emphasis role="comment"># Ctrl-P – Previous Mailbox</emphasis>
bind index,pager \CN sidebar-next <emphasis role="comment"># Ctrl-N – Next Mailbox</emphasis>
bind index,pager \CO sidebar-open <emphasis role="comment"># Ctrl-O – Open Highlighted Mailbox</emphasis>
</screen>
<para>
Pressing <quote>Ctrl-N</quote> (Next mailbox) twice will move
the Sidebar <emphasis role="bold">highlight</emphasis> to down to
the <quote>Seas</quote> mailbox.
</para>
<screen>
Fruit [1] 3/8| 1 Jan 03 Tia Gibson (362) Caiman
<emphasis role="indicator">Animals [1] 2/6</emphasis>| 2 + Jan 22 Rhys Lee ( 48) Dolphin
Cars 4| 3 ! Aug 16 Ewan Brown (333) Hummingbird
<emphasis role="highlight">Seas 1/7</emphasis>| 4 Sep 25 Grace Hall ( 27) Capybara
|<emphasis role="indicator"> 5 N + Nov 12 Evelyn Rogers (453) Tapir </emphasis>
| 6 N + Nov 16 Callum Harrison (498) Hedgehog
|
|
|
|
</screen>
<note>
<para>
Functions <literal><sidebar-next></literal> and
<literal><sidebar-prev></literal> move the Sidebar
<emphasis role="bold">highlight</emphasis>. They
<emphasis role="bold">do not</emphasis> change the open mailbox.
</para>
</note>
<para>
Press <quote>Ctrl-O</quote>
(<literal><sidebar-open></literal>) to open the highlighted
mailbox.
</para>
<screen>
Fruit [1] 3/8| 1 ! Mar 07 Finley Jones (139) Molucca Sea
Animals [1] 2/6| 2 + Mar 24 Summer Jackson ( 25) Arafura Sea
Cars 4| 3 + Feb 28 Imogen Baker (193) Pechora Sea
<emphasis role="indicator">Seas 1/7</emphasis>|<emphasis role="indicator"> 4 N + Feb 23 Isla Hussain (348) Balearic Sea </emphasis>
|
|
|
|
|
|
</screen>
</sect3>
<sect3 id="intro-sidebar-features">
<title>Features</title>
<para>
The Sidebar shows a list of mailboxes in a panel.
</para>
<para>
Everything about the Sidebar can be configured.
</para>
<itemizedlist>
<title>
<link linkend="intro-sidebar-basics">State of the Sidebar</link>
</title>
<listitem>
<para>
Visibility
</para>
</listitem>
<listitem>
<para>
Width
</para>
</listitem>
</itemizedlist>
<itemizedlist>
<title>
<link linkend="intro-sidebar-limit">Which mailboxes are displayed</link>
</title>
<listitem>
<para>
Display all
</para>
</listitem>
<listitem>
<para>
Limit to mailboxes with new mail
</para>
</listitem>
<listitem>
<para>
Pin mailboxes to display always
</para>
</listitem>
</itemizedlist>
<itemizedlist>
<title>
<link linkend="sidebar-sort">The order in which mailboxes are displayed</link>
</title>
<listitem>
<para>
Unsorted (order of mailboxes commands)
</para>
</listitem>
<listitem>
<para>
Sorted alphabetically
</para>
</listitem>
<listitem>
<para>
Sorted by number of new mails
</para>
</listitem>
</itemizedlist>
<itemizedlist>
<title>
<link linkend="intro-sidebar-colors">Color</link>
</title>
<listitem>
<para>
Sidebar indicators and divider
</para>
</listitem>
<listitem>
<para>
Mailboxes depending on their type
</para>
</listitem>
<listitem>
<para>
Mailboxes depending on their contents
</para>
</listitem>
</itemizedlist>
<itemizedlist>
<title>
<link linkend="sidebar-functions">Key bindings</link>
</title>
<listitem>
<para>
Hide/Unhide the Sidebar
</para>
</listitem>
<listitem>
<para>
Select previous/next mailbox
</para>
</listitem>
<listitem>
<para>
Select previous/next mailbox with new mail
</para>
</listitem>
<listitem>
<para>
Page up/down through a list of mailboxes
</para>
</listitem>
</itemizedlist>
<itemizedlist>
<title>Misc</title>
<listitem>
<para>
<link linkend="intro-sidebar-format">Formatting string for mailbox</link>
</para>
</listitem>
<listitem>
<para>
<link linkend="sidebar-next-new-wrap">Wraparound searching</link>
</para>
</listitem>
<listitem>
<para>
<link linkend="intro-sidebar-abbrev">Flexible mailbox abbreviations</link>
</para>
</listitem>
<listitem>
<para>
Support for Unicode mailbox names (UTF-8)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3 id="intro-sidebar-display">
<title>Display</title>
<para>
Everything about the Sidebar can be configured.
</para>
<itemizedlist>
<title>For a quick reference:</title>
<listitem>
<para>
<link linkend="sidebar-variables">Sidebar variables to set</link>
</para>
</listitem>
<listitem>
<para>
<link linkend="sidebar-colors">Sidebar colors to apply</link>
</para>
</listitem>
<listitem>
<para>
<link linkend="sidebar-sort">Sidebar sort methods</link>
</para>
</listitem>
</itemizedlist>
<sect4 id="intro-sidebar-basics">
<title>Sidebar Basics</title>
<para>
The most important variable is
<literal>$sidebar_visible</literal>. You can set this in your
<quote>neomuttrc</quote>, or bind a key to the function
<literal><sidebar-toggle-visible></literal>.
</para>
<screen>
set sidebar_visible <emphasis role="comment"># Make the Sidebar visible by default</emphasis>
bind index,pager B sidebar-toggle-visible <emphasis role="comment"># Use 'B' to switch the Sidebar on and off</emphasis>
</screen>
<para>
Next, decide how wide you want the Sidebar to be. 25 characters
might be enough for the mailbox name and some numbers. Remember,
you can hide/show the Sidebar at the press of button.
</para>
<para>
Finally, you might want to change the divider character. By
default, Sidebar draws an ASCII line between it and the Index
panel. If your terminal supports it, you can use a Unicode
line-drawing character.
</para>
<screen>
set sidebar_width = 25 <emphasis role="comment"># Plenty of space</emphasis>
set sidebar_divider_char = '│' <emphasis role="comment"># Pretty line-drawing character</emphasis>
</screen>
</sect4>
<sect4 id="intro-sidebar-format">
<title>Sidebar Format String</title>
<para>
<literal>$sidebar_format</literal> allows you to customize the
Sidebar display. For an introduction, read
<link linkend="index-format">format strings</link> including the
section about
<link linkend="formatstrings-conditionals">conditionals</link>.
</para>
<para>
The default value is: <literal>%D%* %n</literal>
</para>
<para>
A more detailed value is:
<literal>%B%<F? [%F]>%* %<N?%N/>%S</literal>
</para>
<itemizedlist>
<title>Which breaks down as:</title>
<listitem>
<para>
<literal>%B</literal> – Mailbox name
</para>
</listitem>
<listitem>
<para>
<literal>%<F? [%F]></literal> – If flagged emails
<literal>[%F]</literal>, otherwise nothing
</para>
</listitem>
<listitem>
<para>
<literal>%*</literal> – Pad with spaces
</para>
</listitem>
<listitem>
<para>
<literal>%<N?%N/></literal> – If new emails
<literal>%N/</literal>, otherwise nothing
</para>
</listitem>
<listitem>
<para>
<literal>%S</literal> – Total number of emails
</para>
</listitem>
</itemizedlist>
<table>
<title>sidebar_format</title>
<tgroup cols="3">
<thead>
<row>
<entry>Format</entry>
<entry>Notes</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>%B</entry>
<entry></entry>
<entry>
Name of the mailbox
</entry>
</row>
<row>
<entry>%d</entry>
<entry>* ‡</entry>
<entry>
Number of deleted messages
</entry>
</row>
<row>
<entry>%D</entry>
<entry></entry>
<entry>
Descriptive name of the mailbox
</entry>
</row>
<row>
<entry>%F</entry>
<entry>* †</entry>
<entry>
Number of flagged messages in the mailbox
</entry>
</row>
<row>
<entry>%L</entry>
<entry>* ‡</entry>
<entry>
Number of messages after limiting
</entry>
</row>
<row>
<entry>%n</entry>
<entry>*</entry>
<entry>
If there's new mail, display <quote>N</quote>, otherwise
<quote> </quote> (space).
</entry>
</row>
<row>
<entry>%N</entry>
<entry>* †</entry>
<entry>
Number of unread messages in the mailbox (seen or unseen)
</entry>
</row>
<row>
<entry>%o</entry>
<entry>* †</entry>
<entry>
Number of old messages in the mailbox (unread, but seen)
</entry>
</row>
<row>
<entry>%r</entry>
<entry>* †</entry>
<entry>
Number of read messages in the mailbox
</entry>
</row>
<row>
<entry>%S</entry>
<entry>* †</entry>
<entry>
Size of mailbox (total number of messages)
</entry>
</row>
<row>
<entry>%t</entry>
<entry>* ‡</entry>
<entry>
Number of tagged messages in the mailbox
</entry>
</row>
<row>
<entry>%Z</entry>
<entry>* †</entry>
<entry>
Number of new messages in the mailbox (unread, unseen)
</entry>
</row>
<row>
<entry>%!</entry>
<entry></entry>
<entry>
<quote>!</quote>: one flagged message; <quote>!!</quote>:
two flagged messages; <quote>n!</quote>: n flagged
messages (for n > 2). Otherwise prints nothing.
</entry>
</row>
<row>
<entry>%>X</entry>
<entry></entry>
<entry>
Right justify the rest of the string and pad with
<quote>X</quote>
</entry>
</row>
<row>
<entry>%|X</entry>
<entry></entry>
<entry>
Pad to the end of the line with <quote>X</quote>
</entry>
</row>
<row>
<entry>%*X</entry>
<entry></entry>
<entry>
Soft-fill with character <quote>X</quote> as pad
</entry>
</row>
</tbody>
</tgroup>
</table>
<para>
* = Can be optionally printed if nonzero
</para>
<para>
† = To use these expandos, you must first:
</para>
<screen>set mail_check_stats</screen>
<para>
‡ = Only applicable to the current folder
</para>
<para>
Here are some examples. They show the number of (F)lagged, (N)ew
and (S)ize.
</para>
<table>
<title>sidebar_format examples</title>
<tgroup cols="2">
<thead>
<row>
<entry>Format</entry>
<entry>Example</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>%B%<F? [%F]>%* %<N?%N/>%S</literal></entry>
<entry><screen>mailbox [F] N/S </screen></entry>
</row>
<row>
<entry><literal>%B%* %F:%N:%S</literal></entry>
<entry><screen>mailbox F:N:S </screen></entry>
</row>
<row>
<entry><literal>%B %<N?(%N)>%* %S</literal></entry>
<entry><screen>mailbox (N) S </screen></entry>
</row>
<row>
<entry><literal>%B%* %<F?%F/>%N</literal></entry>
<entry><screen>mailbox F/S </screen></entry>
</row>
</tbody>
</tgroup>
</table>
</sect4>
<sect4 id="intro-sidebar-abbrev">
<title>Abbreviating Mailbox Names</title>
<para>
<literal>$sidebar_delim_chars</literal> tells Sidebar how to
split up mailbox paths. For local directories use
<quote>/</quote>; for IMAP folders use <quote>.</quote>
</para>
<sect5 id="intro-sidebar-abbrev-ex1">
<title>Example 1</title>
<para>
This example works well if your mailboxes have unique names
after the last separator.
</para>
<para>
Add some mailboxes of different depths.
</para>
<screen>
set folder="~/mail"
mailboxes =fruit/apple =fruit/banana =fruit/cherry
mailboxes =water/sea/sicily =water/sea/archipelago =water/sea/sibuyan
mailboxes =water/ocean/atlantic =water/ocean/pacific =water/ocean/arctic
</screen>
<para>
Shorten the names:
</para>
<screen>
set sidebar_short_path <emphasis role="comment"># Shorten mailbox names (truncate all subdirs)</emphasis>
set sidebar_component_depth=1 <emphasis role="comment"># Shorten mailbox names (truncate 1 subdirs)</emphasis>
set sidebar_delim_chars="/" <emphasis role="comment"># Delete everything up to the last or Nth / character</emphasis>
</screen>
<para>
The screenshot below shows what the Sidebar would look like
before and after shortening using
<literal>sidebar_short_path</literal>.
</para>
<screen>
|fruit/apple |apple
|fruit/banana |banana
|fruit/cherry |cherry
|water/sea/sicily |sicily
|water/sea/archipelago |archipelago
|water/sea/sibuyan |sibuyan
|water/ocean/atlantic |atlantic
|water/ocean/pacific |pacific
|water/ocean/arctic |arctic
</screen>
<para>
The screenshot below shows what the Sidebar would look like
before and after shortening using
<literal>sidebar_component_depth=1</literal>.
</para>
<screen>
|fruit/apple |apple
|fruit/banana |banana
|fruit/cherry |cherry
|water/sea/sicily |sea/sicily
|water/sea/archipelago |sea/archipelago
|water/sea/sibuyan |sea/sibuyan
|water/ocean/atlantic |ocean/atlantic
|water/ocean/pacific |ocean/pacific
|water/ocean/arctic |ocean/arctic
</screen>
</sect5>
<sect5 id="intro-sidebar-abbrev-ex2">
<title>Example 2</title>
<para>
This example works well if you have lots of mailboxes which are
arranged in a tree.
</para>
<para>
Add some mailboxes of different depths.
</para>
<screen>
set folder="~/mail"
mailboxes =fruit
mailboxes =fruit/apple =fruit/banana =fruit/cherry
mailboxes =water
mailboxes =water/sea
mailboxes =water/sea/sicily =water/sea/archipelago =water/sea/sibuyan
mailboxes =water/ocean
mailboxes =water/ocean/atlantic =water/ocean/pacific =water/ocean/arctic
</screen>