]> granicus.if.org Git - neomutt/commitdiff
merge: status-color - theming the status bar
authorRichard Russon <rich@flatcap.org>
Mon, 4 Apr 2016 15:23:32 +0000 (16:23 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 4 Apr 2016 15:23:32 +0000 (16:23 +0100)
 * feature: status-color
 * tidy code
 * add docs
 * add ident to PATCHES

1  2 
PATCHES
color.c
curs_main.c
doc/manual.xml.head
mutt_curses.h
protos.h

diff --cc PATCHES
index a0920740a96241a62d8f15fd9f6b4e48d6615ec9,f75dc7323ae5564427aa5a29c0dd11e4f4440fda..743886721241324ccd04c54fde3230a2411bd79a
+++ b/PATCHES
@@@ -1,2 -1,1 +1,3 @@@
 +patch-quasi-delete-neo-UNKNOWN
 +patch-progress-neo-UNKNOWN
+ patch-status-color-neo-UNKNOWN
diff --cc color.c
Simple merge
diff --cc curs_main.c
Simple merge
index 28596a9548432fa812f1e8875bad2c91ec1b516e,1c1bf7b2bcde34351ce6ccf69db54a5bb6272c9b..96ddf35ed9f6264274f735260767e5fa0a55b299
@@@ -8082,245 -8081,209 +8082,448 @@@ please have a look at the mixmaster doc
  
  </sect1>
  
 +<sect1 id="quasi-delete">
 +      <title>Quasi-Delete Patch</title>
 +      <subtitle>Mark emails that should be hidden, but not deleted</subtitle>
 +
 +      <sect2 id="quasi-delete-patch">
 +              <title>Patch</title>
 +
 +              <para>
 +                      To check if Mutt supports <quote>Quasi-Delete</quote>, look for
 +                      <quote>patch-quasi-delete</quote> in the mutt version.
 +                      See: <xref linkend="mutt-patches"/>.
 +              </para>
 +
 +              <itemizedlist>
 +                      <title>Dependencies:</title>
 +                      <listitem><para>mutt-1.5.24</para></listitem>
 +              </itemizedlist>
 +
 +              <para>This patch is part of the <ulink url="https://github.com/neomutt/neomutt/wiki">NeoMutt Project</ulink>.</para>
 +      </sect2>
 +
 +      <sect2 id="quasi-delete-intro">
 +              <title>Introduction</title>
 +
 +        <para>
 +              The <quote>quasi-delete</quote> function marks an email that should be
 +              hidden from the index, but NOT deleted.
 +        </para>
 +
 +        <para>
 +              On its own, this patch isn't very useful.  It forms a useful part of
 +              the notmuch plugin.
 +        </para>
 +      </sect2>
 +
 +<!--
 +      <sect2 id="quasi-delete-variables">
 +              <title>Variables</title>
 +              <para>None</para>
 +      </sect2>
 +-->
 +
 +      <sect2 id="quasi-delete-functions">
 +              <title>Functions</title>
 +              <table id="table-quasi-delete-functions">
 +                      <title>Quasi-Delete Functions</title>
 +                      <tgroup cols="4">
 +                              <thead>
 +                                      <row>
 +                                              <entry>Menus</entry>
 +                                              <entry>Default Key</entry>
 +                                              <entry>Function</entry>
 +                                              <entry>Description</entry>
 +                                      </row>
 +                              </thead>
 +                              <tbody>
 +                                      <row>
 +                                              <entry>index,pager</entry>
 +                                              <entry>(none)</entry>
 +                                              <entry><literal>&lt;quasi-delete&gt;</literal></entry>
 +                                              <entry>delete from mutt, don't touch on disk</entry>
 +                                      </row>
 +                              </tbody>
 +                      </tgroup>
 +              </table>
 +      </sect2>
 +
 +<!--
 +      <sect2 id="quasi-delete-commands">
 +              <title>Commands</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="quasi-delete-colors">
 +              <title>Colors</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="quasi-delete-sort">
 +              <title>Sort</title>
 +              <para>None</para>
 +      </sect2>
 +-->
 +
 +      <sect2 id="quasi-delete-muttrc">
 +              <title>Muttrc</title>
 +<screen>
 +<emphasis role="comment"># Example Mutt config file for the 'quasi-delete' feature.
 + 
 +# The 'quasi-delete' function marks an email that should be hidden
 +# from the index, but NOT deleted.</emphasis>
 +bind index,pager Q quasi-delete
 + 
 +<emphasis role="comment"># vim: syntax=muttrc</emphasis>
 +</screen>
 +      </sect2>
 +
 +      <sect2 id="quasi-delete-see-also">
 +              <title>See Also</title>
 +
 +              <itemizedlist>
 +                      <listitem><para><ulink url="https://github.com/neomutt/neomutt/wiki">NeoMutt Project</ulink></para></listitem>
 +                      <listitem><para><link linkend="notmuch">notmuch patch</link></para></listitem>
 +              </itemizedlist>
 +      </sect2>
 +
 +      <sect2 id="quasi-delete-known-bugs">
 +              <title>Known Bugs</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="quasi-delete-credits">
 +              <title>Credits</title>
 +              <itemizedlist>
 +              <listitem><para>Karel Zak <email>kzak@redhat.com</email></para></listitem>
 +              <listitem><para>Richard Russon <email>rich@flatcap.org</email></para></listitem>
 +              </itemizedlist>
 +      </sect2>
 +</sect1>
 +
 +<sect1 id="progress">
 +      <title>Progress Bar Patch</title>
 +      <subtitle>Show a visual progress bar on slow operations</subtitle>
 +
 +      <sect2 id="progress-patch">
 +              <title>Patch</title>
 +
 +              <para>
 +                      To check if Mutt supports <quote>Progress Bar</quote>, look for
 +                      <quote>patch-progress</quote> in the mutt version.
 +                      See: <xref linkend="mutt-patches"/>.
 +              </para>
 +
 +              <itemizedlist>
 +                      <title>Dependencies:</title>
 +                      <listitem><para>mutt-1.5.24</para></listitem>
 +              </itemizedlist>
 +
 +              <para>This patch is part of the <ulink url="https://github.com/neomutt/neomutt/wiki">NeoMutt Project</ulink>.</para>
 +      </sect2>
 +
 +      <sect2 id="progress-intro">
 +              <title>Introduction</title>
 +
 +        <para>
 +              The <quote>progress</quote> patch shows a visual progress bar on slow
 +              tasks, such as indexing a large folder over the net.
 +        </para>
 +      </sect2>
 +
 +<!--
 +      <sect2 id="progress-variables">
 +              <title>Variables</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="progress-functions">
 +              <title>Functions</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="progress-commands">
 +              <title>Commands</title>
 +              <para>None</para>
 +      </sect2>
 +-->
 +
 +      <sect2 id="progress-colors">
 +              <title>Colors</title>
 +              <table id="table-progress-colors">
 +                      <title>Progress Colors</title>
 +                      <tgroup cols="3">
 +                              <thead>
 +                                      <row>
 +                                              <entry>Name</entry>
 +                                              <entry>Default Color</entry>
 +                                              <entry>Description</entry>
 +                                      </row>
 +                              </thead>
 +                              <tbody>
 +                                      <row>
 +                                              <entry><literal>progress</literal></entry>
 +                                              <entry>default</entry>
 +                                              <entry>Visual progress bar</entry>
 +                                      </row>
 +                              </tbody>
 +                      </tgroup>
 +              </table>
 +      </sect2>
 +
 +<!--
 +      <sect2 id="progress-sort">
 +              <title>Sort</title>
 +              <para>None</para>
 +      </sect2>
 +-->
 +
 +      <sect2 id="progress-muttrc">
 +              <title>Muttrc</title>
 +<screen>
 +<emphasis role="comment"># Example Mutt config file for the 'progress' patch.
 + 
 +# The 'progress' patch provides clear visual feedback for
 +# slow tasks, such as indexing a large folder over the net.
 + 
 +# Set the color of the progress bar
 +# White text on a red background</emphasis>
 +color progress white red
 + 
 +<emphasis role="comment"># vim: syntax=muttrc</emphasis>
 +</screen>
 +      </sect2>
 +
 +      <sect2 id="progress-see-also">
 +              <title>See Also</title>
 +
 +              <itemizedlist>
 +                      <listitem><para><ulink url="https://github.com/neomutt/neomutt/wiki">NeoMutt Project</ulink></para></listitem>
 +                      <listitem><para><link linkend="color">Color command</link></para></listitem>
 +              </itemizedlist>
 +      </sect2>
 +
 +      <sect2 id="progress-known-bugs">
 +              <title>Known Bugs</title>
 +              <para>None</para>
 +      </sect2>
 +
 +      <sect2 id="progress-credits">
 +              <title>Credits</title>
 +              <itemizedlist>
 +              <listitem><para>Rocco Rutte <email>pdmef@gmx.net</email></para></listitem>
 +              <listitem><para>Vincent Lefevre <email>vincent@vinc17.org</email></para></listitem>
 +              <listitem><para>Stefan Kuhn <email>wuodan@hispeed.ch</email></para></listitem>
 +              <listitem><para>Karel Zak <email>kzak@redhat.com</email></para></listitem>
 +              <listitem><para>Richard Russon <email>rich@flatcap.org</email></para></listitem>
 +              </itemizedlist>
 +      </sect2>
 +</sect1>
 +
+ <sect1 id="status-color">
+       <title>Status Color Patch</title>
+       <subtitle>Custom rules for theming the status bar</subtitle>
+       <sect2 id="status-color-patch">
+               <title>Patch</title>
+               <para>
+                       To check if Mutt supports <quote>Status Color</quote>, look for
+                       <quote>patch-status-color</quote> in the mutt version.
+                       See: <xref linkend="mutt-patches"/>.
+               </para>
+               <itemizedlist>
+                       <title>Dependencies:</title>
+                       <listitem><para>mutt-1.5.24</para></listitem>
+               </itemizedlist>
+               <para>This patch is part of the <ulink url="https://github.com/neomutt/neomutt/wiki">NeoMutt Project</ulink>.</para>
+       </sect2>
+       <sect2 id="status-color-intro">
+               <title>Introduction</title>
+         <para>
+               The <quote>status-color</quote> patch allows you to theme different
+               parts of the status bar (also when it's used by the index).
+         </para>
+         <para>
+               Unlike normal color commands, <literal>color status</literal> can now
+               take up to 2 extra parameters (regex, num).
+         </para>
+       </sect2>
+ <!--
+       <sect2 id="status-color-variables">
+               <title>Variables</title>
+               <para>None</para>
+       </sect2>
+       <sect2 id="status-color-functions">
+               <title>Functions</title>
+               <para>None</para>
+       </sect2>
+ -->
+       <sect2 id="status-color-commands">
+               <title>Commands</title>
+               <cmdsynopsis>
+                       <command>color</command>
+                       <arg choice="plain">
+                               <option>status</option>
+                       </arg>
+                       <arg choice="plain">
+                               <replaceable class="parameter">foreground</replaceable>
+                       </arg>
+                       <arg choice="plain">
+                               <replaceable class="parameter">background</replaceable>
+                       </arg>
+                       <group choice="opt">
+                               <arg choice="plain">
+                                       <replaceable class="parameter">regex</replaceable>
+                               </arg>
+                               <group choice="opt">
+                                       <arg choice="plain">
+                                               <replaceable class="parameter">num</replaceable>
+                                       </arg>
+                               </group>
+                       </group>
+               </cmdsynopsis>
+               <para>
+                       With zero parameters, Mutt will set the default color for the entire
+                       status bar.
+               </para>
+               <para>
+                       With one parameter, Mutt will only color the parts matching the
+                       regex.
+               </para>
+               <para>
+                       With two parameters, Mutt will only color the num'th sub-match of
+                       the regex.
+               </para>
+       </sect2>
+       <sect2 id="status-color-colors">
+               <title>Colors</title>
+               <table id="table-status-color-colors">
+                       <title>Status Colors</title>
+                       <tgroup cols="3">
+                               <thead>
+                                       <row>
+                                               <entry>Name</entry>
+                                               <entry>Default Color</entry>
+                                               <entry>Description</entry>
+                                       </row>
+                               </thead>
+                               <tbody>
+                                       <row>
+                                               <entry>status</entry>
+                                               <entry><literal>reverse</literal></entry>
+                                               <entry>Status bar</entry>
+                                       </row>
+                               </tbody>
+                       </tgroup>
+               </table>
+       </sect2>
+ <!--
+       <sect2 id="status-color-sort">
+               <title>Sort</title>
+               <para>None</para>
+       </sect2>
+ -->
+       <sect2 id="status-color-muttrc">
+               <title>Muttrc</title>
+ <screen>
+ <emphasis role="comment"># Example Mutt config file for the 'status-color' patch.
+  
+ # The 'status-color' patch allows you to theme different parts of
+ # the status bar (also when it's used by the index).
+  
+ # For the examples below, set some defaults</emphasis>
+ set status_format='-%r-Mutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%&gt;-(%P)---'
+ set index_format='%4C %Z %{%b %d} %-15.15L (%?l?%4l&amp;%4c?) %s'
+ set sort=threads
+ set sort_aux=last-date-received
+  
+ <emphasis role="comment"># 'status color' can take up to 2 extra parameters
+  
+ # color status foreground background [ regex [ num ]]
+  
+ # 0 extra parameters
+ # Set the default color for the entire status line</emphasis>
+ color status blue white
+  
+ <emphasis role="comment"># 1 extra parameter
+ # Set the color for a matching pattern
+ # color status foreground background regexp
+  
+ # Highlight New, Deleted, or Flagged emails</emphasis>
+ color status brightred white '(New|Del|Flag):[0-9]+'
+  
+ <emphasis role="comment"># Highlight mailbox ordering if it's different from the default
+ # First, highlight anything (*/*)</emphasis>
+ color status brightred default '\([^)]+/[^)]+\)'
+  
+ <emphasis role="comment"># Then override the color for one specfic case</emphasis>
+ color status default   default '\(threads/last-date-received\)'
+  
+ <emphasis role="comment"># 2 extra parameters
+ # Set the color for the nth submatch of a pattern
+ # color status foreground background regexp num
+  
+ # Highlight the contents of the []s but not the [] themselves</emphasis>
+ color status red default '\[([^]]+)\]' 1
+  
+ <emphasis role="comment"># The '1' refers to the first regex submatch, which is the inner
+ # part in ()s
+  
+ # Highlight the mailbox</emphasis>
+ color status brightwhite default 'Mutt: ([^ ]+)' 1
+  
+ <emphasis role="comment"># Search for 'Mutt: ' but only highlight what comes after it
+  
+ # vim: syntax=muttrc</emphasis>
+ </screen>
+       </sect2>
+       <sect2 id="status-color-see-also">
+               <title>See Also</title>
+               <itemizedlist>
+                       <listitem><para><ulink url="https://github.com/neomutt/neomutt/wiki">NeoMutt Project</ulink></para></listitem>
+                       <listitem><para><link linkend="compile-time-features">Compile-Time Features</link></para></listitem>
+                       <listitem><para><link linkend="regexp">Regular Expressions</link></para></listitem>
+                       <listitem><para><link linkend="patterns">Patterns</link></para></listitem>
+                       <listitem><para><link linkend="index-color">index-color patch</link></para></listitem>
+                       <listitem><para><link linkend="color">Color command</link></para></listitem>
+               </itemizedlist>
+       </sect2>
+       <sect2 id="status-color-known-bugs">
+               <title>Known Bugs</title>
+               <para>None</para>
+       </sect2>
+       <sect2 id="status-color-credits">
+               <title>Credits</title>
+               <itemizedlist>
+               <listitem><para>David Sterba <email>dsterba@suse.cz</email></para></listitem>
+               <listitem><para>Thomas Glanzmann <email>thomas@glanzmann.de</email></para></listitem>
+               <listitem><para>Kirill A. Shutemov <email>kirill@shutemov.name</email></para></listitem>
+               <listitem><para>Richard Russon <email>rich@flatcap.org</email></para></listitem>
+               </itemizedlist>
+       </sect2>
+ </sect1>
  </chapter>
  
  <chapter id="security">
diff --cc mutt_curses.h
Simple merge
diff --cc protos.h
Simple merge