# {{@@ header() @@}} # _ _ _ _ # | \ | | ___ ___ _ __ ___ _ _| |_| |_ # | \| |/ _ \/ _ \| '_ ` _ \| | | | __| __| # | |\ | __/ (_) | | | | | | |_| | |_| |_ # |_| \_|\___|\___/|_| |_| |_|\__,_|\__|\__| # Mailbox {{{ # Set MailDir set mbox_type = Maildir set header_cache = ~/.cache/mutt/ set my_mailroot = ~/.local/share/mail set use_from = yes set ssl_force_tls = yes {%@@ for name, info in mail.items() | reverse @@%} set my_source_command = \ "_mutt_get-mail '{{@@ name @@}}' '{{@@ info.user @@}}' '{{@@ info.mail @@}}' |" folder-hook "$my_mailroot/{{@@ name @@}}/" \ source "\"$my_source_command\"" source "$my_source_command" {%@@ endfor @@%} {%@@ for name, info in mail.items() @@%} set my_source_command = \ "_mutt_get-mail '{{@@ name @@}}' '{{@@ info.user @@}}' '{{@@ info.mail @@}}' |" macro index,pager "source \"$my_source_command\"!" {%@@ endfor @@%} # }}} # General {{{ set sort = 'reverse-date' set mark_old = no # Unread mail stay unread until read set mailcap_path = ~/.config/neomutt/mailcap auto_view text/html # automatically show html auto_view application/pgp-encrypted alternative_order text/plain text/enriched text/html set query_command= "khard email --parsable %s" # }}} # General rebindings{{{ # index # bind index "{{@@ key.left @@}}" noop bind index "{{@@ key.down @@}}" next-entry bind index "{{@@ key.up @@}}" previous-entry bind index "{{@@ key.right @@}}" display-message bind index noop bind index next-entry bind index previous-entry bind index display-message bind index g noop # needed to allow gg bind index G last-entry bind index gg first-entry bind index D delete-message bind index U undelete-message bind index L limit bind index tag-entry # Attachment screen bind attach view-mailcap bind attach "{{@@ key.up @@}}" previous-entry bind attach "{{@@ key.down @@}}" next-entry bind attach "{{@@ key.left @@}}" exit bind attach "{{@@ key.right @@}}" view-mailcap bind editor noop bind pager "{{@@ key.left @@}}" exit bind pager "{{@@ key.down @@}}" next-line bind pager "{{@@ key.up @@}}" previous-line bind pager "{{@@ key.right @@}}" view-attachments bind pager exit bind pager next-line bind pager previous-line bind pager view-attachments bind index,pager,browser '{{@@ key.up .upper() @@}}' half-up bind index,pager,browser '{{@@ key.down.upper() @@}}' half-down bind browser "{{@@ key.left @@}}" goto-parent macro browser "{{@@ key.left @@}}" '..' "Go to parent folder" bind index,pager H view-raw-message bind browser l select-entry bind pager,browser gg top-page bind pager,browser G bottom-page bind index,pager S sync-mailbox bind index,pager R group-reply # Mouse wheel bind index \031 previous-undeleted bind index \005 next-undeleted bind pager \031 previous-line bind pager \005 next-line bind editor complete-query set abort_key="" macro index,pager a \ "khard add-email" \ "add the sender email address to khard" # macro index,pager a "set my_pipe_decode=\$pipe_decode pipe_decodeabook --add-emailset pipe_decode=\$my_pipe_decode; unset my_pipe_decode" "add the sender address to abook" macro index \Cr "T~UN." "mark all messages as read" macro index O "mbsync -a" "run mbsync to sync all mail" macro index \Cf "unset wait_keyread -p 'Enter a search term to find with notmuch: ' x; echo \$x >~/.cache/mutt_terms~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"" "show only messages matching a notmuch pattern" #macro index A "all\n" "show all messages (undo limit)" # }}} # Sidebar mappings{{{ set sidebar_visible = yes set sidebar_width = 20 set sidebar_short_path = yes set sidebar_next_new_wrap = yes # set mail_check_stats set sidebar_format = '%B%?F? [%F]?%* %?N?%N/? %?S?%S?' bind index,pager "\C{{@@ key.down @@}}" sidebar-next bind index,pager "\C{{@@ key.up @@}}" sidebar-prev bind index,pager "\C{{@@ key.right @@}}" sidebar-open bind index,pager "\C{{@@ key.left @@}}" sidebar-toggle-visible # }}} # Appearence{{{ # Don't show the menu bar at the top set help = false # Disables the `+` displayed at line wraps set markers = no set date_format="%m/%d %H:%M" set index_format="%2C %zs %?X?A& ? %D %-15.15F %s" set display_filter = 'sed -e "s/ */\n/g"' #}}} # colors{{{ # General color status black default color indicator brightwhite {{@@ accent_color_name @@}} # Messages color index default default '.*' color index_number black default color index_author {{@@ accent_color_name @@}} default '.*' color index_subject green default '.*' # New messages color index brightgreen default "~N|~O" color index_author brightred default "~N" color index_subject brightcyan default "~N" # Sidebar color sidebar_new green default color sidebar_highlight default green color sidebar_indicator brightwhite {{@@ accent_color_name @@}} color sidebar_divider black default # Header - information for any open email color header default default "^(Date)" color header {{@@ accent_color_name @@}} default "^(From)" color header green default "^(Subject)" color header brightwhite default "^(CC|BCC)" # Content - Body of open email color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL color attachment default black # Comically large Regex{{{ color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]" # }}} # }}} # vim: ft=sh