# Filename:      ~/.config/neomutt/neomuttrc
# Purpose:       config file for neomutt
# Authors:       Dennis Eriksen <d@ennis.no>
# Bug-Reports:   Email <idgatt@dnns.no>
# License:       This file is licensed under the BSD-3-Clause license.
################################################################################


# Create 'From' header from 'X-Original-To' header
set reply_with_xorig = yes

# Periodically check for new mail
set mail_check_stats = yes

# How often to check for new mail
set mail_check_stats_interval = 180



# Sidebar

# (sidebar) Show the sidebar
set sidebar_visible = yes

# (sidebar) Width of the sidebar
set sidebar_width = 30

# (sidebar) Characters that separate nested folders
set sidebar_delim_chars = "/."

# (sidebar) Abbreviate the paths using the `$folder` variable
set sidebar_short_path = yes

# (sidebar) Indent nested folders
set sidebar_folder_indent = yes

# (sidebar) Indent nested folders using this string
set sidebar_indent_string = " "

# (sidebar) Character to draw between the sidebar and index
set sidebar_divider_char = " │"

# (sidebar) printf-like format string for the sidebar panel
set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S"





# Notmuch

# (notmuch) Default limit for Notmuch queries
set nm_db_limit = 0

# The messages tagged with these tags are excluded and not loaded
# from notmuch DB to mutt unless specified explicitly.
set nm_exclude_tags = "ignore, trash, junk"

# (notmuch) Database timeout
set nm_open_timeout = 5

# (notmuch) Default query type: 'threads' or 'messages'
set nm_query_type = "theads"

# (notmuch) Tag to use for flagged messages
set nm_flagged_tag = "flagged"

# This variable allows you to customize the file browser display for virtual
# folders to your personal taste.
set vfolder_format = "%6n(%6N) %f"

# (notmuch) Use the first virtual mailbox as a spool file
set virtual_spool_file = no


# Bindings

bind index,pager B sidebar-toggle-visible
bind index,pager \CP sidebar-prev
bind index,pager \CN sidebar-next
bind index,pager \Cl sidebar-open
bind index,pager <F22> sidebar-prev
bind index,pager <F23> sidebar-next
bind index,pager <F24> sidebar-open
bind index,pager <F21> sidebar-open

# open a different virtual folder
bind index,pager X change-vfolder

# read entire thread of the current message
bind index,pager + entire-thread

# modify (notmuch) tags
bind index,pager \` modify-labels

# generate virtual folder from query
bind index,pager S vfolder-from-query

# modify labels and then hide message
# bind index,pager ??? modify-labels-then-hide

# toggle between mailboxes and virtual mailboxes
bind index,pager x sidebar-toggle-virtual


#
# Source muttrc
#
source "$XDG_CONFIG_HOME/mutt/muttrc"

# --------------------------------------------------------------------------
# COMMANDS - shown with an example
# --------------------------------------------------------------------------

# virtual-mailboxes description notmuch-URI { description notmuch-URI ...}
# virtual-mailboxes "Climbing" "notmuch://?query=climbing"

# Replace some tags with icons
# tag-transforms tag transformed-string { tag transformed-string ...}
# tag-transforms "inbox"   "i"   \
#                "unread"  "u"   \
#                "replied" "↻ "  \
#                "sent"    "➥ "  \
#                "todo"    "T"   \
#                "deleted" "DEL" \
#                "invites" "CAL"

# See README.notmuch for an explanation
# tag-formats tag format-string { tag format-string ...}
# tag-formats "inbox"   "GI" \
#              "unread"  "GU" \
#              "replied" "GR" \
#              "sent"    "GS" \
#              "todo"    "Gt" \
#              "deleted" "GD" \
#              "invites" "Gi"
#
## END OF FILE #################################################################
# vim:ft=muttrc