#  ▓▓▓▓▓▓▓▓▓▓
# ░▓ Author ▓ Abdullah <https://abdullah.today/>
# ░▓▓▓▓▓▓▓▓▓▓
# ░░░░░░░░░░
#


# source important files

source $HOME/.config/mutt/colorrc
source $HOME/.config/mutt/gpgforak.rc
source ~/.config/mutt/aliases



set folder                                                                                               = ~/.mail/
mailboxes                     = $HOME/.mail/Inbox $HOME/.mail/Sent $HOME/.mail/Outbox $HOME/.mail/Drafts $HOME/.mail/Spam $HOME/.mail/Trash
set from                                                                                                 = abdullah@abdullah.today
set sendmail                                                                                             = msmtp
set abort_noattach                                                                                       = "no"
set abort_noattach_regexp                                                                                = "attach"
set abort_nosubject                                                                                      = "ask-yes"
set alias_file                                                                                           = "~/.config/mutt/aliases" #source it
set alias_format                                                                                         = "%4n %2f %t %-10a   %r"
set allow_8bit                                                                                           = "yes"
set allow_ansi                                                                                           = "no"
set arrow_cursor                                                                                         = "yes"
set ascii_chars                                                                                          = "no"
set askbcc                                                                                               = "no"
set askcc                                                                                                = "no"
set assumed_charset                                                                                      =
set attach_charset                                                                                       =
set attach_format                                                                                        = "%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] "
set attach_sep                                                                                           = "\n"
set attach_split                                                                                         = "yes"
set query_command                                                                                        = "goobook query %s"
set attribution                                                                                          = "On %d, %n wrote:"
set attribution_locale                                                                                   =
set auto_tag                                                                                             = "no"
set autoedit                                                                                             = "yes"
set beep                                                                                                 = "yes"
set beep_new                                                                                             = "yes"
set bounce                                                                                               = "ask-yes"
set bounce_delivered                                                                                     = "no"
set braille_friendly                                                                                     = "no"
set browser_abbreviate_mailboxes                                                                         = "yes"
set certificate_file                                                                                     = "~/.config/mutt/certs"
set crypt_autosign                                                                                       = yes
set crypt_replyencrypt                                                                                   = yes
set date_format                                                                                          = "%d/%m"
set editor                                                                                               = vim
set fast_reply                                                                                           = yes
set header_cache                                                                                         = ~/.cache/mutt
set imap_keepalive                                                                                       = 300
set include                                                                                              = yes
set mail_check                                                                                           = 60
set mail_check_stats                                                                                     = yes
set mailcap_path                                                                                         = ~/.config/mutt/mailcap
set mbox_type                                                                                            = Maildir
set message_cachedir                                                                                     = ~/.cache/mutt/messages
set pager                                                                                                = vim
set pager_context                                                                                        = 3
set pager_index_lines                                                                                    = 8
set pgp_autosign                                                                                         = yes
set pgp_replysign                                                                                        = yes
set pgp_replysignencrypted                                                                               = yes
set pgp_sign_as                                                                                          = 0x5CBC7BC7
set pgp_timeout                                                                                          = 3600
set pgp_use_gpg_agent                                                                                    = yes
set postpone_encrypt                                                                                     = yes
set postpone_encrypt_as                                                                                  = 0xE6E81782
set postponed                                                                                            = ~/.mail/Drafts
set prompt_after                                                                                         = no
set quote_regexp                                                                                         = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
set record                                                                                               = ~/.mail/Sent
set trash                                                                                                = ~/.mail/Trash
set reply_regexp                                                                                         = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
set rfc2047_parameters                                                                                   = yes
set send_charset                                                                                         = utf-8
set sidebar_format                                                                                       = "%B%?F? [%F]?%* %?N?%N/?%S"
set sidebar_visible                                                                                      = yes
set thorough_search
set sidebar_width                                                                                        = 24
set status_chars                                                                                         = " *%A"
set sig_dashes                                                                                           = no
set signature                                                                                            = ~/.config/mutt/signature
set sort                                                                                                 = threads
set sort_aux                                                                                             = reverse-last-date-received
set spoolfile                                                                                            = ~/.mail/Inbox
set ssl_force_tls                                                                                        = yes
set ssl_starttls                                                                                         = yes
set timeout                                                                                              = 3
set use_from                                                                                             = yes
set quit
set visual                                                                                               = vim
set wait_key                                                                                             = no
set status_format                                                                                        = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───"
set sort_re
set edit_headers
unset confirmappend
unset imap_passive
unset mark_old
set smart_wrap
unset markers
set pipe_decode
set text_flowed
set pager_stop
auto_view application/pgp-encrypted
set menu_scroll
set uncollapse_jump
set delete
set tilde
set imap_check_subscribed

# HTML

auto_view text/html
alternative_order text/enriched text/plain text/html
alternative_order text/plain text/enriched text/html
alternative_order text/plain text/html

# Keybindings

bind attach <return> view-mailcap
bind editor <Tab> complete-query
bind attach,index G last-entry
bind attach,index g first-entry
bind attach,index,pager \CD next-page
bind attach,index,pager \CU previous-page
bind browser $ check-new
bind index   \t   next-unread
bind index  ,\t previous-unread
bind index <space>  collapse-thread
bind index <tab>    sync-mailbox
bind index G        last-entry
bind index R        group-reply
bind index,pager <down>   sidebar-next
bind index,pager <right>  sidebar-open
bind index,pager <up>     sidebar-prev
bind pager G bottom
bind pager R  group-reply
bind pager g top
bind pager gg top
bind pager j  next-line
bind pager k  previous-line

# colors

color header blue default "^(Subject)"
color index red white "~v~(~F)!~N"
color sidebar_new yellow default

# macros

macro index,pager a "<pipe-message>goobook add<return>" "add the sender address to Google contacts"
macro index C "<copy-message>?<toggle-mailboxes>" 
# macro index q "<sync-mailbox><shell-escape>/usr/bin/offlineimap -o >/dev/null 2>&1<enter><quit>"
macro index M "<save-message>?<toggle-mailboxes>"
macro index O "<shell-escape>mbsync -Va<enter>" 
macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" 
macro index,pager U "<enter-command>set pipe_decode  = yes<enter><pipe-message>urlview<enter><enter-command>set pipe_decode = no<enter>""view URLs"

# headers

my_hdr User-Agent: 'Eat your heart out, Windows Lusers'
hdr_order from: to: cc: date: subject:
unhdr_order *

#vim:filetype=muttrc
