aboutsummaryrefslogtreecommitdiff
path: root/neomuttrc
diff options
context:
space:
mode:
Diffstat (limited to 'neomuttrc')
-rw-r--r--neomuttrc171
1 files changed, 171 insertions, 0 deletions
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 "<pipe-message>abook --add-email-quiet<return>" "Add this sender to Abook"
+macro generic,index,pager \ca "<shell-escape>abook<return>" "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 <C-up> sidebar-prev # Previous Mailbox
+bind index,pager <C-down> sidebar-next # Next Mailbox
+bind index,pager * sidebar-open # Open Highlighted Mailbox
+#
+bind pager <down> next-line # pager down one line
+bind pager <up> previous-line # pager up one line
+bind editor <Tab> complete-query # Abook completion
+
+#### Macros
+# account swap
+unset wait_key #don't wait for user input
+macro index,pager <F2> "<sync-mailbox><enter-command>source ~/neomutt/accounts/philip.rc<enter><change-folder>!<enter><redraw-screen>"
+# toggle sidebar
+macro index,pager <F5> "<enter-command>toggle sidebar_visible <enter><redraw-screen>"
+# F6 in index runs mbsync, see philip.rc
+macro pager <F6> "<pipe-message>~/neomutt/bin/translate.sh<enter>"
+# urlscan
+macro index,pager \cb "<pipe-message>urlscan -c -d<Enter>" "call urlscan to extract URLs out of a message"
+macro attach,compose \cb "<pipe-entry>urlscan -c -d<Enter>" "call urlscan to extract URLs out of a message"
+# reload config
+macro index,browser,pager \cr "<enter-command>source ~/neomutt/.neomuttrc<enter>"
+# View in graphic browser
+macro attach 'V' "<pipe-entry>iconv -c --to-code=UTF8 > ~/neomutt/tmp/mail.html<enter><shell-escape>floorp ~/.neomutt/tmp/mail.html<enter>"
+
+# SPAM
+# Mark as not spam and move mail to inbox
+macro index,pager n "<tag-prefix><pipe-entry>bogofilter -Mn<enter>\
+<tag-prefix><save-message>=Inbox<enter><enter><sync-mailbox>" "Mark as non spam & move to Inbox"
+# Mark as not spam and do nothing else
+macro index . "<tag-prefix><pipe-entry>bogofilter -Mn<enter>" "Mark as not spam in index"
+macro pager . "<pipe-entry>bogofilter -Mn<enter>" "Mark as not spam in pager"
+# Mark as spam and delete
+macro index x "<tag-prefix><pipe-entry>bogofilter -MNs<enter><tag-prefix><save-message>=Junk<enter><enter><sync-mailbox>"
+macro pager x "<pipe-entry>bogofilter -MNs<enter><save-message>=Junk<enter><enter><sync-mailbox>"
+
+
+#### more config files
+source ~/neomutt/accounts/philip.rc # default account
+source ~/neomutt/themes/venelles.rc # my color theme
+