dotfiles/.muttrc

117 lines
3.6 KiB
Plaintext

# ########### #
# .muttrc #
# ########### #
## General options {{{
set header_cache = "~/.cache/mutt"
set mail_check = 60
set mbox_type=Maildir
set editor=vim
set mailcap_path = ~/.mutt/mailcap
auto_view text/html
alternative_order text/plain text/html
# }}}
## Shortcuts {{{
macro index S "<shell-escape>mbsync -a^M" "Update through mbsync"
bind index <space> collapse-thread
# Scan and open URLs
macro pager \cu "| urlscan<enter>"
# Add address to khard (see address book)
macro index,pager A "<pipe-message>khard add-email<return>" "add the sender email address to khard"
# Tag or flag a message
bind index * tag-entry
bind index,pager ! flag-message
bind index % shell-escape # Defaults on '!'
macro pager < "<set-flag>*<enter><previous-undeleted>" "tag message and move to previous"
macro pager > "<set-flag>*<enter><next-undeleted>" "tag message and move to previous"
# Send a message to Archives
macro index,pager E ":set confirmappend=no delete=yes\n<tag-prefix><save-message>=Archive\n<sync-mailbox>:set confirmappend=yes delete=ask-yes\n" "Archive message"
# Navigate the sidebar
bind index,pager B sidebar-toggle-visible
bind index,pager <F73> sidebar-prev # Shift + Up
bind index,pager <F72> sidebar-next # Shift + Down
bind index,pager <S-Right> sidebar-open
# View mail in graphical browser
macro attach 'V' "<pipe-entry>iconv -c --to-code=UTF8 > ~/.cache/mutt/mail.html<enter><shell-escape>$BROWSER ~/.cache/mutt/mail.html<enter>"
# }}}
## Appearance {{{
set date_format = "%d/%m/%Y (%H:%M)" # Date as day/month
set index_format = "[%Z] %D %-20.20F %s" # Display [status] date Who What
set sort = threads # Nice tree view for threads
set sort_aux = reverse-last-date-received # New mail on top
unset markers # Remove those '+' signs at line breaks
# }}}
## Colors {{{
# Palette for use with the Linux console. Black background.
#color hdrdefault blue default
color quoted blue default
color signature blue default
color attachment brightyellow default
color prompt brightmagenta default
color message brightred default
color error brightred default
color indicator black white
color status brightgreen blue
color tree default default
color normal default default
color markers red default
color search white default
color tilde brightmagenta default
# Colors by tags:
# all ~A
# del ~D
# flag ~F
# new ~N
# old ~O
# repl ~Q
# read ~R
# tag ~T
# unrea ~U
color index blue default ~F
color index brightcyan default "~N|~O"
color index green default "~Q"
color body brightwhite default '\*+[^*]+\*+'
color body brightgreen default '_+[^_]+_+'
# }}}
## Sidebar {{{
# regularely poll for mailboxes stats
set mail_check_stats = yes
set mail_check_stats_interval = 60 # default 60s
# Sidebar info and colors
set sidebar_visible = yes
set sidebar_width = 20
set sidebar_divider_char = '║'
set sidebar_short_path = yes
set sidebar_sort_method = unsorted
set sidebar_format = '%B%?F? [%F]?%* %?N?%N/?%S'
source '~/.mutt/sidebar-accounts'
# }}}
## Address Book {{{
# Use khard as an addressbook
set query_command= "echo %s | xargs khard email --parsable --search-in-source-files"
bind editor <Tab> complete-query
bind editor ^T complete
# }}}
### Accounts {{{
# Typical account declaration:
# mailboxes '------- Mailbox -------' # Add a delimiter to the sidebar
# source "./mutt/model
# folder-hook $folder 'source ~/.mutt/model'
# macro index,pager <fN> '<enter-command>source ~/.mutt/model<enter><change-folder>!<enter>'
#
#All accounts declarations are kept in .mutt/accounts and sourced here (only because I don't want to widespread all my mail addresse :)
source ~/.mutt/accounts
# }}}
# vim:foldmethod=marker:foldlevel=0