set editor=vim
set send_charset="utf-8"
set sig_on_top=yes

set index_format="%4C %Z %8{%b %d} %-15.15L %y [%E] %s"
set sort=threads
set sort_aux=last-date-received

## accounts
source $EMAIL_ACCOUNT

# Misc options
set edit_headers=yes
set envelope_from                    # which from?
set sig_dashes                       # dashes before sig
set reply_to                         # reply to Reply to: field
set reverse_name=yes                 # reply as whomever it was to
set include                          # include message in replies
set forward_quote                    # include message in forwards 
set uncollapse_jump                  # don't collapse on an unread message

set pager_stop             # don't go to next message automatically
set menu_scroll            # scroll in menus

unset wait_key

## other
source mutt-color-solarized.muttrc
source muttrc.forgotten-attachment
source muttrc.sidebar


## Sidebar customization
set sidebar_visible = yes
set sidebar_width = 30
set sidebar_short_path
set sidebar_delim_chars="/"
set sidebar_folder_indent 
set sidebar_indent_string="  "


set alias_file=~/.config/mutt/muttrc.aliases
set sort_alias=alias
set reverse_alias=yes
source $alias_file

# if there is only html dump that
auto_view text/html

# this helps with multipart messages
alternative_order text/plain text/html

# Key bindings
bind pager       <Up>    previous-line 
bind pager       <Down>  next-line
bind index,pager \CS     sidebar-toggle-visible
bind index,pager \CN     sidebar-next
bind index,pager \CP     sidebar-prev
bind index       <F73>   previous-entry
bind index       <F72>   next-entry
bind index       <space> collapse-thread

macro attach S "<save-entry><bol>~/Téléchargements/<eol>" "Save to downloads"
macro index,pager T "<save-message>=[Gmail]/Corbeille<enter><enter>" "Trash"


set new_mail_command="notify-send 'Nouveaux emails' '%n nouveaux emails\n%u non lus' &"
