macro index,pager H "<view-attachments><search>html<enter><view-mailcap><exit>"
#+END_SRC
*** Mouse wheel
#+BEGIN_SRC conf
bind pager \031 previous-line # Mouse wheel
bind pager \005 next-line # Mouse wheel
#+END_SRC
*** TODO Contacts
#+BEGIN_SRC conf
macro pager \Ca "<pipe-message> goobook add<return>" "add the sender address to Google contacts"
#+END_SRC
*** Compose
#+BEGIN_SRC conf
bind compose p postpone-message
macro attach,compose \Cw "<pipe-entry> urlview<enter>" "call urlview to open links"
bind compose R rename-attachment
bind compose a attach-file
#+END_SRC
**** TODO Attach file using GUI File Manager
#+BEGIN_SRC conf
macro compose A "<shell-escape>bash $HOME/.mutt/bin/attach-file.sh<enter><enter-command>source /tmp/muttpick<enter>" "Attach with GUI"
#+END_SRC
**** TODO - Write html emails using markdown
#+BEGIN_SRC conf
# macro compose M "F pandoc -s -f markdown -t html \ny^T^Utext/html; charset=us-ascii\n"
#+END_SRC
**** TODO Open another instance of neomutt in readonly mode while composing
#+BEGIN_SRC conf
macro compose M "<shell-escape>termite -e \"neomutt -R\"<enter>"
#+END_SRC
*** TODO Sidebar
#+BEGIN_SRC conf
bind index,pager \Ck sidebar-prev
bind index,pager \Cj sidebar-next
bind index,pager \Co sidebar-open
bind index,pager \Cp sidebar-prev-new
bind index,pager \Cn sidebar-next-new
bind index,pager B sidebar-toggle-visible
#+END_SRC
*** Attachments
#+BEGIN_SRC conf
bind attach <return> view-mailcap
macro attach W <save-entry><kill-line>~/Downloads/<enter>y "Save entry"
#+END_SRC
** Colors
*** Basic colors
#+BEGIN_SRC conf
color normal brightblue default
color error red default
color tilde white default
color message cyan default
color markers red black
color attachment black default
color search brightmagenta default
color status brightblue white
color indicator brightwhite yellow
color tree yellow default
# basic monocolor screen
mono bold bold
mono underline underline
mono indicator reverse
mono error bold
#+END_SRC
*** Index
#+BEGIN_SRC conf
#color index red default "~D(!~p|~p)" # deleted
#color index white default ~F # flagged
#color index brightred default ~= # duplicate messages
#color index brightcyan default "~A!~N!~T!~p!~Q!~F!~D!~P" # the rest
#color index J_base default "~A~N!~T!~p!~Q!~F!~D" # the rest, new
color index red default "~A" # all messages
color index brightred default "~E" # expired messages
color index blue default "~N" # new messages
color index blue default "~O" # old messages
color index brightmagenta default "~Q" # messages that have been replied to
color index brightcyan default "~R" # read messages
color index blue default "~U" # unread messages
color index blue default "~U~$" # unread, unreferenced messages
color index brightblue default "~v" # messages part of a collapsed thread
color index brightblue default "~P" # messages from me
color index cyan default "~p!~F" # messages to me
color index cyan default "~N~p!~F" # new messages to me
color index cyan default "~U~p!~F" # unread messages to me
color index brightcyan default "~R~p!~F" # messages to me
color index red default "~F" # flagged messages
color index red default "~F~p" # flagged messages to me
color index red default "~N~F" # new flagged messages
color index red default "~N~F~p" # new flagged messages to me
color index red default "~U~F~p" # new flagged messages to me
color index white red "~D" # deleted messages
color index brightgreen default "~v~(!~N)" # collapsed thread with no unread
color index yellow default "~v~(~N)" # collapsed thread with some unread
color index green default "~N~v~(~N)" # collapsed thread with unread parent
# statusbg used to indicated flagged when foreground color shows other status
# for collapsed thread
color index red white "~v~(~F)!~N" # collapsed thread with flagged, no unread
color index yellow white "~v~(~F~N)" # collapsed thread with some unread & flagged
color index green white "~N~v~(~F~N)" # collapsed thread with unread parent & flagged
color index green white "~N~v~(~F)" # collapsed thread with unread parent, no unread inside, but some flagged
color index cyan white "~v~(~p)" # collapsed thread with unread parent, no unread inside, some to me directly
color index yellow red "~v~(~D)" # thread with deleted (doesn't differentiate between all or partial)
#color index yellow default "~(~N)" # messages in threads with some unread
#color index green default "~S" # superseded messages
#color index red default "~T" # tagged messages
#color index brightred red "~=" # duplicated messages
#+END_SRC
*** Message headers
#+BEGIN_SRC conf
color hdrdefault brightcyan default
color header brightblue default "^(From)"
color header blue default "^(Subject)"
#+END_SRC
*** Body
#+BEGIN_SRC conf
color quoted blue default
color quoted1 cyan default
color quoted2 yellow default
color quoted3 red default
color quoted4 brightred default
color signature brightcyan default
color bold white default
color underline white default
color normal default default
color body brightgreen default "[;:][-o][)/(|]" # emoticons
color body brightgreen default "[;:][)(|]" # emoticons
color body brightgreen default "[*]?((N)?ACK|CU|LOL|SCNR|BRB|BTW|CWYL|\
|FWIW|vbg|GD&R|HTH|HTHBE|IMHO|IMNSHO|\
|IRL|RTFM|ROTFL|ROFL|YMMV)[*]?"
color body brightgreen default "[ ][*][^*]*[*][ ]?" # more emoticon?
color body brightgreen default "[ ]?[*][^*]*[*][ ]" # more emoticon?
#+END_SRC
*** PGP
#+BEGIN_SRC conf
color body red default "(BAD signature)"
color body cyan default "(Good signature)"
color body brightwhite default "^gpg: Good signature .*"
color body brightblue default "^gpg: "
color body brightblue red "^gpg: BAD signature from.*"
mono body bold "^gpg: Good signature"
mono body bold "^gpg: BAD signature from.*"
#+END_SRC
*** Urls
#+BEGIN_SRC conf
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
#+END_SRC
*** Emails
#+BEGIN_SRC conf
# color body J_magent default "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])"
#+END_SRC
*** Various smilies and the like
#+BEGIN_SRC conf
#color body brightblack default "<[Gg]>" # <g>
#color body brightblack default "<[Bb][Gg]>" # <bg>
#color body yellow default " [;:]-*[})>{(<|]" # :-) etc...
# *bold*
#color body blue default "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)"
#mono body bold "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)"
# _underline_
#color body blue default "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)"
#mono body underline "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)"
# /italic/ (Sometimes gets directory names)
#color body blue default "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)"
#mono body underline "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)"
# Border lines.
#color body blue default "( *[-+=#*~_]){6,}"
#folder-hook . "color status J_black J_status "
#folder-hook gmail/inbox "color status J_black yellow "
#folder-hook gmail/important "color status J_black yellow "
#+END_SRC
** Sidebar
#+BEGIN_SRC conf
# Should the Sidebar be shown?
set sidebar_visible = yes
# How wide should the Sidebar be in screen columns?
# Note: Some characters, e.g. Chinese, take up two columns each.
set sidebar_width = 20
# Should the mailbox paths be abbreviated?
set sidebar_short_path = yes
# When abbreviating mailbox path names, use any of these characters as path
# separators. Only the part after the last separators will be shown.
# For file folders '/' is good. For IMAP folders, often '.' is useful.
set sidebar_delim_chars = '/.'
# If the mailbox path is abbreviated, should it be indented?
set sidebar_folder_indent = yes
# Indent mailbox paths with this string.
set sidebar_indent_string = ' '
# Make the Sidebar only display mailboxes that contain new, or flagged,
# mail.
set sidebar_new_mail_only = no
# Any mailboxes that are whitelisted will always be visible, even if the
# sidebar_new_mail_only option is enabled.
# sidebar_whitelist '/home/user/mailbox1'
# sidebar_whitelist '/home/user/mailbox2'
# When searching for mailboxes containing new mail, should the search wrap
# around when it reaches the end of the list?
set sidebar_next_new_wrap = no
# Show the Sidebar on the right-hand side of the screen
set sidebar_on_right = no
# The character to use as the divider between the Sidebar and the other Mutt
# panels.
# Note: Only the first character of this string is used.
set sidebar_divider_char = '│'
# Enable extended buffy mode to calculate total, new, and flagged
# message counts for each mailbox.
set mail_check_stats
# Display the Sidebar mailboxes using this format string.
set sidebar_format = '%B%?F? [%F]?%* %?N?%N/?%S'
# Sort the mailboxes in the Sidebar using this method:
# count - total number of messages
# flagged - number of flagged messages
# new - number of new messages
# path - mailbox path
# unsorted - do not sort the mailboxes
set sidebar_sort_method = 'unsorted'
#+END_SRC
** TODO [#A] Searching using Mu
#+begin_src conf
# mutt macros for mu
macro index \Cf "<shell-escape>mu find --clearlinks --format=links --linksdir=~/.mail/search " \
"mu find"
macro index gf "<change-folder-readonly>~/.mail/search<enter>" \
"mu find results"
#+end_src
** Contacts with Mu
#+BEGIN_SRC conf
# set query_command="goobook query '%s'"
# set query_command="lbdbq '%s'"
set query_command="mu cfind '%s' -o mutt-ab"
bind editor <Tab> complete-query
#+END_SRC
** Paths
#+BEGIN_SRC conf
set folder = ~/.mail # mail location
set alias_file = ~/.mutt/alias # where to store aliases
set header_cache = ~/.mutt/cache/headers # where to store headers
set message_cachedir = ~/.mutt/cache/bodies # where to store bodies
set certificate_file = ~/.mutt/certificates # where to store certs
# set mailcap_path = ~/.mutt/config/mailcap # entries for filetypes
set tmpdir = ~/.mutt/temp # where to keep temp files