chore(mail): rework neomutt configuration

* add mailcap to handle attachment
* add per-account mutt hook
* remove Trash folder sync and unassign Trash for each accounts
* remove `dd` keybinding
* add `Ctrl+b` macro to launch urlscan
This commit is contained in:
Yorick Barbanneau 2025-08-11 00:17:39 +02:00
parent a023323e34
commit 97051b5cc2
2 changed files with 58 additions and 33 deletions

View file

@ -1,5 +1,4 @@
# vi: ft=muttrc
# base16-mutt: base16-shell support for mutt
## Base
color normal color20 default # softer, bold
@ -30,7 +29,7 @@ color index_author color20 default
color index_date color20 default
color index_flags color20 default
color index_tag color20 default
color index_tags color20 default
color index_tags italic color08 default
color index_author italic color06 default "~g !~V"
color index_author color04 default "~g ~V"
@ -48,14 +47,16 @@ color index_date italic color00 color06 "~T"
color index_tags italic color00 color06 "~T"
color index_tag italic color00 color06 "~T"
color index_subject color01 color18 "~D" # deleted messages
color index_subject italic bold color00 default "~T (~U|~N|~O)"
## Weak
color index color01 default "~v~(~F)" # collapsed thread with flagged inside
color index color01 default "~v~(~F)" # collapsed thread with flagged inside
# Selection
color index italic color00 color06 "~T" # tagged messages
color index color01 color18 "~D" # deleted messages
color index default color18 "~D" # deleted messages
### Message Headers ----------------------------------------------------
@ -77,22 +78,26 @@ color header color06 color00 "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-
# When possible, these regular expressions attempt to match http://spec.commonmark.org/
## Weak
# ~~~ Horizontal rules ~~~
color body color08 color00 "([[:space:]]*[-+=#*~_]){3,}[[:space:]]*"
## Strong
color body color08 default "([[:space:]]*[-+=#*~_]){3,}[[:space:]]*"
# *Bold* span
color body brightcolor03 color00 "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)"
color body brightcolor03 default "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)"
# _Underline_ span
color body color05 color00 "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)"
color body underline color20 default "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)"
# /Italic/ span (Sometimes gets directory names)
color body color05 color00 "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)"
color body italic color20 default "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)"
# ATX headers
color body color04 color00 "^[[:space:]]{0,3}#+[[:space:]].*$"
## Highlight
color body color04 default "^[[:space:]]{0,3}#+[[:space:]].*$"
# `Code` span
color body color02 color00 "(^|[[:space:][:punct:]])\`[^\`]+\`([[:space:][:punct:]]|$)"
# Indented code block
color body color02 color00 "^[[:space:]]{4,}.*$"
# URLs
color body color05 default "(^|[[:space:][:punct:]])\`[^\`]+\`([[:space:][:punct:]]|$)"
color body bold color01 default "^(\\*[[:space:]])"
## URI
color body italic color04 color00 "([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<>\"]"
# Email addresses
color body color06 color00 "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])"