dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

muttrc (6333B)


      1 # vim: filetype=neomuttrc foldmethod=marker
      2 source `{ [ -f ~/.config/dark-theme ] && printf "colors-dark"; } || printf "colors-light";`
      3 
      4 # Don't ask to press key on shell commands
      5 unset wait_key
      6 
      7 # Don't move to next message when modifying -- this breaks notmuch macros
      8 set resolve = no
      9 
     10 set mbox_type = Maildir
     11 set mail_check=0 # minimum time between scans
     12 unset mark_old # it's enough to see whats unread
     13 set mailcap_path = ~/.config/mailcap
     14 
     15 # PGP options
     16 set pgp_default_key = 0x67A9DD9A68AE0B7C
     17 set crypt_autosign
     18 set crypt_verify_sig
     19 set crypt_replysign
     20 set crypt_opportunistic_encrypt
     21 set pgp_self_encrypt
     22 set postpone_encrypt
     23 
     24 # We want weed
     25 set weed
     26 # (weed headers when displaying, forwarding, printing, or replying)
     27 
     28 set delete               # don't ask, just do
     29 unset confirmappend      # don't ask, just do!
     30 set quit                 # don't ask, just do!!
     31 auto_view text/*
     32 
     33 # Abort when I forget an attachment
     34 set abort_noattach = yes
     35 set abort_noattach_regex = "attach|attached|attachments?"
     36 
     37 # For key bindings, do :exec what-key
     38 
     39 # Sidebar
     40 set sidebar_visible = yes
     41 set sidebar_width = 20
     42 set sidebar_short_path = yes
     43 set sidebar_next_new_wrap = yes
     44 set mail_check_stats
     45 set sidebar_format = '%D%?F? [%F]?%* %?N?%N/? %?S?%S?'
     46 bind index,pager \Cp sidebar-prev
     47 bind index,pager \Cn sidebar-next
     48 bind index,pager \Cl sidebar-open
     49 bind index,pager B sidebar-toggle-visible
     50 bind index t tag-entry
     51 
     52 # Switch ; and : keys
     53 unbind generic,pager :
     54 unbind generic,pager ;
     55 bind generic,pager \; enter-command
     56 bind generic : tag-prefix
     57 
     58 set date_format = "%d/%m"
     59 set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c) %> [%g]"
     60 
     61 # Github issue was fixed, yay!
     62 # Threads should be sorted by date, top-to-botom.
     63 # Newest top-level messages should appear at the top.
     64 set use_threads = yes
     65 set sort = reverse-last-date-received
     66 set sort_aux = date-received
     67 
     68 # there's an issue with sorting where messages in threads should be sorted by date, top-to-bottom.
     69 # but at the moment it's a "wontfix". hopefully that changes soon.
     70 # https://github.com/neomutt/neomutt/issues/2342,
     71 set uncollapse_jump                        # don't collapse on an unread message
     72 set sort_re                                # thread based also on regex
     73 set reply_regex = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
     74 
     75 # Pager
     76 set pager_index_lines = 10 # number of index lines to show
     77 set pager_context = 3      # number of context lines to show
     78 set pager_stop             # don't go to next message automatically
     79 set menu_scroll            # scroll in menus
     80 set tilde                  # show tildes like in vim
     81 unset markers              # no ugly plus signs
     82 set quote_regex = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
     83 alternative_order text/plain text/enriched text/html
     84 
     85 bind pager k  previous-line
     86 bind pager j  next-line
     87 bind pager J next-entry
     88 bind pager K previous-entry
     89 bind pager g noop
     90 bind pager gg top
     91 bind pager G  bottom
     92 
     93 macro index,pager,attach,compose U "\
     94 <enter-command> set my_pipe_decode=\$pipe_decode pipe_decode<Enter>\
     95 <pipe-message> urlview<Enter>\
     96 <enter-command> set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<Enter>" \
     97 "call urlview to extract URLs out of a message"
     98 
     99 # Composing
    100 set edit_headers                     # show headers when composing
    101 set fast_reply                       # skip to compose when replying
    102 set fcc_attach                       # save attachments with the body
    103 set mime_forward                     # forward attachments as part of body
    104 set forward_format = "Fwd: %s"       # format of subject when forwarding
    105 set forward_decode                   # decode when forwarding
    106 set attribution = "On %d, %n wrote:" # format of quoting header
    107 set reply_to                         # reply to Reply to: field
    108 set reverse_name                     # reply as whomever it was to
    109 set include                          # include message in replies
    110 set forward_quote                    # include message in forwards
    111 set attach_format = "%u%D%I %t%4n %T%.40d (%.40F -> %.40f)%> [%.7m/%.10M, %.6e%?C?, %C?, %s]"
    112 
    113 # General mappings
    114 macro index,pager S '<sync-mailbox><shell-escape>notmuch-hook<enter>'
    115 bind index,pager | pipe-message
    116 bind index,pager s save-message
    117 bind index,pager m mail
    118 bind compose p postpone-message
    119 bind compose l view-attach
    120 bind compose h exit
    121 bind index p recall-message
    122 bind index g noop
    123 bind index gg       first-entry
    124 bind index G        last-entry
    125 bind index,pager R        group-reply
    126 bind index,pager r reply
    127 bind index <space>  collapse-thread
    128 bind generic,index j next-entry
    129 bind generic,index k previous-entry
    130 bind index ! shell-escape
    131 bind attach <return> view-mailcap
    132 bind attach l view-mailcap
    133 bind compose \Cr rename-attachment
    134 bind compose d edit-description
    135 bind editor <space> noop
    136 bind index G last-entry
    137 bind index gg first-entry
    138 bind pager,attach h exit
    139 bind pager l view-attachments
    140 bind index L limit
    141 bind index h noop
    142 bind index l display-message
    143 macro browser h '<change-dir><kill-line>..<enter>' "Go to parent folder"
    144 bind index,pager H view-raw-message
    145 bind browser l select-entry
    146 bind pager,browser gg top-page
    147 bind pager,browser G bottom-page
    148 bind index,pager,browser \Cd half-down
    149 bind index,pager,browser \Cu half-up
    150 bind pager <space> half-down
    151 bind pager \C? half-up # backspace key
    152 bind index \031 previous-undeleted	# Mouse wheel
    153 bind index \005 next-undeleted		# Mouse wheel
    154 bind pager \031 previous-line		# Mouse wheel
    155 bind pager \005 next-line		# Mouse wheel
    156 set query_command = "khard email --parsable %s"
    157 bind editor <Tab> complete-query
    158 bind editor ^T    complete
    159 bind index,pager M noop
    160 bind index,pager,browser / search
    161 bind index,pager,browser n search-next
    162 bind index,pager,browser N search-opposite
    163 macro index A "<limit>all<enter>"
    164 
    165 set nm_default_url = "notmuch://`notmuch config get database.path`"
    166 bind index,pager + entire-thread
    167 bind index,pager \Cf vfolder-from-query
    168 
    169 bind index,pager i noop
    170 source school
    171 folder-hook $folder 'source ~/.config/mutt/school'
    172 macro index,pager is '<sync-mailbox><enter-command>source ~/.config/mutt/school<enter><change-vfolder>Inbox (S)<enter><check-stats>' "switch to school"
    173 
    174 source personal
    175 folder-hook $folder 'source ~/.config/mutt/personal'
    176 macro index,pager ip '<sync-mailbox><enter-command>source ~/.config/mutt/personal<enter><change-vfolder>Inbox (P)<enter><check-stats>' "switch to personal"