From 4d4c0e81a0caace3dc035ff9010ee01ac162ec86 Mon Sep 17 00:00:00 2001 From: Philip Wittamore Date: Sat, 10 May 2025 18:48:35 +0200 Subject: update --- neomuttrc | 171 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 neomuttrc (limited to 'neomuttrc') diff --git a/neomuttrc b/neomuttrc new file mode 100644 index 0000000..9729019 --- /dev/null +++ b/neomuttrc @@ -0,0 +1,171 @@ +# .neomuttrc + +set config_charset = "utf-8" +set send_charset = "utf-8" +set charset = "utf-8" +set assumed_charset = "utf-8" +set attach_charset = "utf-8" +set rfc2047_parameters = yes + +set header_cache = ~/neomutt/cache/headers +set certificate_file = ~/neomutt/certificates +set message_cachedir = ~/neomutt/cache/bodies +set alias_file = ~/neomutt/aliases +set mailcap_path = ~/neomutt/mailcap +set tmpdir = /tmp + +# mail settings +set mail_check = 30 +set timeout = 600 # time to wait until abort waiting for input. +set mail_check_stats # periodically calculate message statistics +set xterm_set_titles = yes +set sleep_time = 0 # Don't pause + +# mailcap +auto_view text/html text/plain + +# Sidebar +set sidebar_visible = yes +set sidebar_short_path # Shorten mailbox names +set sidebar_delim_chars = "/." # Delete everything up to the last / character +set sidebar_folder_indent = yes # Indent folders whose names we've shortened +set sidebar_indent_string = "▸" +set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S" +set sidebar_width = 30 +set sidebar_sort_method = "unsorted" +set sidebar_divider_char ="│" + +# Folder hooks +folder-hook . `rm -f /neomutt/tmp/*` # empty tmp folder +folder-hook "~/.mail/philip/*" "source ~/neomutt/accounts/philip.rc" + +# Printing +set print = ask-no +set print_command = "~/neomutt/bin/print_unicode.sh" + +# index display +set sort = threads +set sort_aux = last-date-received +set delete = yes # just delete don't ask + +# pager display +set pager = "builtin" +set smart_wrap = yes # lines wrapped at word boundary at screen edge. +set markers = no # don't add "+" at wrapped lines +set pager_stop = yes # don't continue to next message +set display_filter = "~/neomutt/bin/display_filter.sh" + +# message display +ignore * +unhdr_order * +unignore Date: From: To: Cc: Bcc: X-Mailer: User-Agent: X-Spam-Flag: Subject: +hdr_order Date: From: To: Cc: Bcc: X-Mailer: User-Agent: X-Spam-Flag: Subject: +set quote_regex = "^([ \t]*[|>:}#])+" +set smileys = "(>From )|(:[-^]?[][)(><}{|/DP])" # catch some common false positives of $quote_regex +set pipe_decode = "yes" # weed headers and attempt to decode the messages first. + +# attachments +attachments +A */.* # Give all MIME parts an "attachment" disposition +set attach_save_dir = "~/Documents" +set attach_save_without_prompting +set abort_noattach = ask-yes +# French & English regex +set abort_noattach_regex = "\\<(attach|attached|attaché|attachés|attache|attachons|joint|jointe|joints|jointes|joins|joignons)\\>" + +# editor +set text_flowed = yes # don't cut lines +#set editor = "~/.neomutt/bin/mutt-trim %s; joe -nobackups %s" +set editor = "~/neomutt/bin/mutt-trim %s; micro %s" + +# Replies +set attribution = "* %n <%a> [%(%y%m%d %H:%M)]:" +set fast_reply # do not ask for to, subject,... when replying. +set include = yes # include message + +# Forwards +set forward_format = "[Tr: %s]" +set forward_quote + +# Abook +set query_command = "abook --mutt-query '%s'" +macro index,pager a "abook --add-email-quiet" "Add this sender to Abook" +macro generic,index,pager \ca "abook" "launch abook" + +# Header Compression +set header_cache_compress_method = "zlib" +set header_cache_compress_level = 1 + +# PGP commands +set pgp_decode_command = "gpg2 %?p?--passphrase- 0? --no-verbose --batch --output - %f" +set pgp_verify_command = "gpg2 --no-verbose --batch --output - --verify %s %f" +set pgp_decrypt_command = "gpg2 --passphrase- 0 --no-verbose --batch --output - %f" +set pgp_sign_command = "gpg2 --no-verbose --batch --output - --passphrase- 0 --armor --detach-sign --textmode %?a?-u %a? %f" +set pgp_clearsign_command = "gpg2 --no-verbose --batch --output - --passphrase- 0 --armor --textmode --clearsign %?a?-u %a? %f" +set pgp_encrypt_only_command = "/usr/lib/neomutt/pgpewrap gpg2 --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to $pgp_sign_as -- -r %r -- %f" +set pgp_encrypt_sign_command = "/usr/lib/neomutt/pgpewrap gpg2 --passphrase- 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to $pgp_sign_as -- -r %r -- %f" +set pgp_import_command = "gpg2 --no-verbose --import %f" +set pgp_export_command = "gpg2 --no-verbose --export --armor %r" +set pgp_verify_key_command = "gpg2 --no-verbose --batch --fingerprint --check-sigs %r" +set pgp_list_pubring_command = "gpg2 --no-verbose --batch --with-colons --list-keys %r" +set pgp_list_secring_command = "gpg2 --no-verbose --batch --with-colons --list-secret-keys %r" + + +# other settings + +#unset quit + +# Spam flag +# spam "X-Spam-Flag: YES" "󰉁" +# This pushes spam lines to right and it's ugly +# so instead I colour the line that contains X-Spam-Flag using +# color index color197 color233 ~hX-Spam-Flag +# in the colour theme + +# add my_hdr $mutt_version - $os_version +my_hdr User-Agent: `neomutt -v | head -1` - `uname -r` Linux + +# file browser +set sort_browser=reverse-date + +#### Key bindings +# sidebar +bind index,pager sidebar-prev # Previous Mailbox +bind index,pager sidebar-next # Next Mailbox +bind index,pager * sidebar-open # Open Highlighted Mailbox +# +bind pager next-line # pager down one line +bind pager previous-line # pager up one line +bind editor complete-query # Abook completion + +#### Macros +# account swap +unset wait_key #don't wait for user input +macro index,pager "source ~/neomutt/accounts/philip.rc!" +# toggle sidebar +macro index,pager "toggle sidebar_visible " +# F6 in index runs mbsync, see philip.rc +macro pager "~/neomutt/bin/translate.sh" +# urlscan +macro index,pager \cb "urlscan -c -d" "call urlscan to extract URLs out of a message" +macro attach,compose \cb "urlscan -c -d" "call urlscan to extract URLs out of a message" +# reload config +macro index,browser,pager \cr "source ~/neomutt/.neomuttrc" +# View in graphic browser +macro attach 'V' "iconv -c --to-code=UTF8 > ~/neomutt/tmp/mail.htmlfloorp ~/.neomutt/tmp/mail.html" + +# SPAM +# Mark as not spam and move mail to inbox +macro index,pager n "bogofilter -Mn\ +=Inbox" "Mark as non spam & move to Inbox" +# Mark as not spam and do nothing else +macro index . "bogofilter -Mn" "Mark as not spam in index" +macro pager . "bogofilter -Mn" "Mark as not spam in pager" +# Mark as spam and delete +macro index x "bogofilter -MNs=Junk" +macro pager x "bogofilter -MNs=Junk" + + +#### more config files +source ~/neomutt/accounts/philip.rc # default account +source ~/neomutt/themes/venelles.rc # my color theme + -- cgit v1.2.3