#{{{ General
set realname            = 'Kevin Tangreen'
set editor              = 'vim'
set signature           = '~/.mutt/signature'

set folder              = '~/mail'
set mbox_type           = Maildir

set alias_file          = '~/mutt/alias'
set header_cache        = '~/.mutt/cache/headers'
set message_cachedir    = '~/.mutt/cache/bodies'

set wait_key            = no
set sleep_time          = 0     # switch mailbox immediately
set fast_reply          = yes   # reply immediately
set include             = yes   # always include quote

set attribution         = 'On %{%m/%d/%y %H:%M}, %n wrote:'
set use_from            = yes
set envelope_from       = yes
set sendmail            = "/usr/bin/msmtp"
set query_command       = "abook --mutt-query '%s'"

set date_format         = "%m/%d"
set sort                = threads
set sort_aux            = reverse-last-date-received
 set index_format="%Z  %d »  %-20.20F  %s"

set pager_index_lines   = 10
set pager_context       = 4
set pager_stop
unset markers           # No + markers

set to_chars            = " .>-<L"
set status_chars        = " *%A"
set status_format       = "-%r- %v ───────────/ %f %m%?n? [+%n]?%?d? [-%d]?%?t? [*%t]? /%?p?───/ %p waiting to send /?─%>─(%P)───"

set collapse_unread     = no
#}}}
#{{{ gpgme
#set crypt_use_gpgme             = yes
#set crypt_replysign             = yes
#set crypt_replyencrypt          = yes
#set crypt_replysignencrypted    = yes
#set crypt_verify_sig            = yes
#:set pgp_auto_decode             = yes
#}}}
#{{{ Accounts

#source ~/.mutt/account.gmail.com
#folder-hook $folder/gmail "source ~/.mutt/account.gmail.com"

#source ~/.mutt/account.kit.edu
#folder-hook $folder/kit "source ~/.mutt/account.kit.edu"

# source default mailbox
#source ~/.mutt/account.gmail.com

#reply-hook .                        ""
#reply-hook '~t reply.github.com'    "set editor='vim -c \":call MailFixGithubReply()\""

folder-hook INBOX   "macro index,pager $ '<sync-mailbox><shell-escape>mbsync -q inboxes<enter><shell-escape>notmuch new<enter>'"

folder-hook .       "exec collapse-all"
#}}}
#{{{ Headers
ignore *
unignore from: to: cc: date: subject:
unhdr_order *
hdr_order from: to: cc: date: subject:

auto_view text/html
#}}}
#{{{ Colors
 color 	normal default default
 color 	signature default default
 color 	hdrdefault cyan default
 color 	attachment yellow default
 color 	tilde brightyellow default
 color 	header red default "From: "
 color 	header yellow default "Subject: "
 color 	header magenta default "Date: "
 color 	quoted green default
 color 	quoted1 cyan default
 color 	quoted2 green default
 color 	quoted3 cyan default
 color 	error red default # error messages
 color 	message white	default # message informational messages
 color 	indicator red default # indicator for the "current message"
 color 	status blue default # blue # status lines in the folder index sed for the mini-help line
 color 	tree red default # the "tree" display of threads within the folder index
 color 	search white blue # search matches found with search within the internal pager
 color 	markers default default # The markers indicate a wrapped line
 color 	index yellow default '~O'
 color 	index yellow default '~N'
 color 	index red default '~F' # Flagged Messages are important!
 color 	index blue default '~D' # Deleted Mails - use dark color as these are already "dealt with"
 # identifies email addresses
 color body brightred default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+
 # identifies URLs
 color body brightblue default (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+


#for solarized colorscheme

#color normal        brightyellow    default         
#color error         red             default         
#color tilde         black           default         
#color message       cyan            default         
#color markers       red             white           
#color attachment    white           default         
#color search        brightmagenta   default         
##color status        J_black         J_status        
#color status        brightyellow    black           
#color indicator     brightblack     yellow          
#color tree          yellow          default                                     # arrow in threads

#}}}
#{{{ Bindings
bind index j            next-entry
bind index k            previous-entry
bind index \Cj          next-unread

bind index gg           first-entry
bind index G            last-entry

bind index <return>     display-message
bind index <tab>        sync-mailbox
bind index <space>      collapse-thread

bind pager \Cj          next-line
bind pager \Ck          previous-line

bind index,pager \Cu    half-up
bind index,pager \Cd    half-down

#bind index,pager J      sidebar-next
#bind index,pager K      sidebar-prev
#bind index,pager O      sidebar-open

bind editor <tab>       complete-query
#}}}
#{{{ Macros
macro pager \cb <pipe-entry>'urlview'<enter>  "follow links"
macro index,pager a "<pipe-message>abook --add-email<return>" "add the sender address to abook"
#}}}
