NixOS Advanced Virtual Infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

173 lines
7.7 KiB

  1. # pgp stuff
  2. set crypt_use_gpgme = yes
  3. set crypt_autosign=yes
  4. set crypt_verify_sig=yes
  5. set crypt_replysign=yes
  6. set crypt_replyencrypt=yes
  7. set crypt_replysignencrypted=yes
  8. set crypt_opportunistic_encrypt=yes
  9. set pgp_default_key="52142D39A7CEF8FA872BCA7FDE62E1E2A6145556"
  10. set pgp_check_gpg_decrypt_status_fd
  11. #set pgp_use_gpg_agent = yes
  12. set pgp_self_encrypt = yes
  13. set crypt_protected_headers_save = yes
  14. set crypt_protected_headers_write = yes
  15. set mailcap_path = ~/.config/mutt/mailcap
  16. set date_format="%d/%m/%y %I:%M%p"
  17. set index_format="%2C %zs %?X?A& ? %D %-15.15F %s (%-4.4c)"
  18. set sort = 'threads'
  19. set sort_aux = 'reverse-date'
  20. set smtp_authenticators = 'gssapi:login'
  21. set query_command = "abook --config "$XDG_CONFIG_HOME"/abook/abookrc --datafile "$XDG_CACHE_HOME"/abook/addressbook --mutt-query '%s'"
  22. set rfc2047_parameters = yes
  23. set sleep_time = 0 # Pause 0 seconds for informational messages
  24. set markers = no # Disables the `+` displayed at line wraps
  25. set mark_old = no # Unread mail stay unread until read
  26. set mime_forward = yes # attachments are forwarded with mail
  27. set wait_key = no # mutt won't ask "press key to continue"
  28. set fast_reply # skip to compose when replying
  29. set fcc_attach # save attachments with the body
  30. set forward_format = "Fwd: %s" # format of subject when forwarding
  31. set forward_quote # include message in forwards
  32. set reverse_name # reply as whomever it was to
  33. set include # include message in replies
  34. set mail_check=60 # to avoid lags using IMAP with some email providers (yahoo for example)
  35. auto_view text/html # automatically show html (mailcap uses w3m)
  36. auto_view application/pgp-encrypted
  37. alternative_order text/plain text/enriched text/html
  38. bind index,pager i noop
  39. bind index,pager g noop
  40. bind index \Cf noop
  41. # maybe execute macro S?
  42. timeout-hook "exec sync-mailbox"
  43. # General rebindings
  44. bind attach <return> view-mailcap
  45. bind attach l view-mailcap
  46. bind editor <space> noop
  47. bind index G last-entry
  48. bind index gg first-entry
  49. bind pager,attach h exit
  50. bind pager j next-line
  51. bind pager k previous-line
  52. bind pager l view-attachments
  53. bind index D delete-message
  54. bind index U undelete-message
  55. bind index L limit
  56. bind index h noop
  57. bind index l display-message
  58. bind index <space> tag-entry
  59. #bind browser h goto-parent
  60. macro browser h '<change-dir><kill-line>..<enter>' "Go to parent folder"
  61. bind index,pager H view-raw-message
  62. bind browser l select-entry
  63. bind pager,browser gg top-page
  64. bind pager,browser G bottom-page
  65. bind index,pager,browser d half-down
  66. bind index,pager,browser u half-up
  67. bind index,pager R group-reply
  68. bind index \031 previous-undeleted # Mouse wheel
  69. bind index \005 next-undeleted # Mouse wheel
  70. bind pager \031 previous-line # Mouse wheel
  71. bind pager \005 next-line # Mouse wheel
  72. bind editor <Tab> complete-query
  73. bind index,pager x entire-thread
  74. macro index,pager S "<sync-mailbox><shell-escape>~/.config/mutt/mailsync.sh &> /dev/null &<enter>" "flush all changes and synchronize"
  75. macro index,pager a "<enter-command>set my_pipe_decode=\$pipe_decode pipe_decode<return><pipe-message>abook --config "$XDG_CONFIG_HOME"/abook/abookrc --datafile "$XDG_CACHE_HOME"/abook/addressbook --add-email<return><enter-command>set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<return>" "add the sender address to abook"
  76. macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
  77. macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>read -p 'Enter a search term to find with notmuch: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~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' \`\"<enter>" "show only messages matching a notmuch pattern"
  78. macro index A "<limit>all\n" "show all messages (undo limit)"
  79. # Sidebar mappings
  80. set sidebar_visible = yes
  81. set sidebar_width = 20
  82. set sidebar_short_path = yes
  83. set sidebar_next_new_wrap = yes
  84. set mail_check_stats
  85. set sidebar_format = '%B%?F? [%F]?%* %?N?%N/? %?S?%S?'
  86. bind index,pager \Ck sidebar-prev
  87. bind index,pager \Cj sidebar-next
  88. bind index,pager \Co sidebar-open
  89. bind index,pager \Cp sidebar-prev-new
  90. bind index,pager \Cn sidebar-next-new
  91. bind index,pager B sidebar-toggle-visible
  92. # Default index colors:
  93. color index yellow default '.*'
  94. color index_author red default '.*'
  95. color index_number blue default
  96. color index_subject cyan default '.*'
  97. # New mail is boldened:
  98. color index brightyellow black "~N"
  99. color index_author brightred black "~N"
  100. color index_subject brightcyan black "~N"
  101. # Tagged mail is highlighted:
  102. color index brightyellow blue "~T"
  103. color index_author brightred blue "~T"
  104. color index_subject brightcyan blue "~T"
  105. # Other colors and aesthetic settings:
  106. mono bold bold
  107. mono underline underline
  108. mono indicator reverse
  109. mono error bold
  110. color normal default default
  111. color indicator brightblack white
  112. color sidebar_highlight red default
  113. color sidebar_divider brightblack black
  114. color sidebar_flagged red black
  115. color sidebar_new green black
  116. color normal brightyellow default
  117. color error red default
  118. color tilde black default
  119. color message cyan default
  120. color markers red white
  121. color attachment white default
  122. color search brightmagenta default
  123. color status brightyellow black
  124. color hdrdefault brightgreen default
  125. color quoted green default
  126. color quoted1 blue default
  127. color quoted2 cyan default
  128. color quoted3 yellow default
  129. color quoted4 red default
  130. color quoted5 brightred default
  131. color signature brightgreen default
  132. color bold black default
  133. color underline black default
  134. color normal default default
  135. # Regex highlighting:
  136. color header blue default ".*"
  137. color header brightmagenta default "^(From)"
  138. color header brightcyan default "^(Subject)"
  139. color header brightwhite default "^(CC|BCC)"
  140. color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses
  141. color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL
  142. color body green default "\`[^\`]*\`" # Green text between ` and `
  143. color body brightblue default "^# \.*" # Headings as bold blue
  144. color body brightcyan default "^## \.*" # Subheadings as bold cyan
  145. color body brightgreen default "^### \.*" # Subsubheadings as bold green
  146. color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow
  147. color body brightcyan default "[;:][-o][)/(|]" # emoticons
  148. color body brightcyan default "[;:][)(|]" # emoticons
  149. color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon?
  150. color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon?
  151. color body red default "(BAD signature)"
  152. color body cyan default "(Good signature)"
  153. color body brightblack default "^gpg: Good signature .*"
  154. color body brightyellow default "^gpg: "
  155. color body brightyellow red "^gpg: BAD signature from.*"
  156. mono body bold "^gpg: Good signature"
  157. mono body bold "^gpg: BAD signature from.*"
  158. 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<>\"]"