From 3119a91f576b5bd080b70aa4de89f0e9ae5e48b3 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Mon, 29 Aug 2022 14:32:09 +0800 Subject: Update muttrc --- mutt/default | 8 ++++++++ mutt/mailcap | 5 ++--- mutt/muttrc.topo | 3 +-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/mutt/default b/mutt/default index 17a69cd..23367a6 100644 --- a/mutt/default +++ b/mutt/default @@ -21,6 +21,13 @@ set pager_index_lines = 5 set markers = no # Remove '+' for long links with limited terminal width set index_format = "%4C %8Y %Z %(%b %d) %-15.15L (%?l?%4l&%4c?) %s" +# Preference +alternative_order text/plain text/enriched text/html +# Auto convert text/html MIME type to text/plain +auto_view text/html +# Macro to open html with css +macro index,pager h "htmail-decode" "render html mail using htmail-view" + # Vim-style key binding, \c means Ctrl # ref: https://fancyseeker.github.io/2015/08/19/mutt/#vim风格键位绑定 bind index sync-mailbox @@ -51,6 +58,7 @@ bind pager \cd half-down bind pager \cu half-up bind pager \cj next-entry bind pager \ck previous-entry +bind pager \ch display-toggle-weed bind attach x view-mailcap macro generic,index,pager \cr ":source ~/.config/mutt/muttrc\n" "Reload mutt's configuration file" macro index ":exec sync-mailbox\n" "Sync Mailbox" diff --git a/mutt/mailcap b/mutt/mailcap index 17e4d0b..d52d2ae 100644 --- a/mutt/mailcap +++ b/mutt/mailcap @@ -1,3 +1,2 @@ -#text/html; xdg-open '%s' &; test=test -n "$DISPLAY"; needsterminal; -application/*; mkdir -p /tmp/mutt \; cp %s /tmp/mutt \; xdg-open /tmp/mutt/$(basename %s) & -#text/html; lynx -dump %s; nametemplate=%s.html; copiousoutput; +text/html; xdg-open '%s' &; test=test -n "$DISPLAY"; needsterminal; +text/html; w3m -I %{charset} -T text/html; copiousoutput; diff --git a/mutt/muttrc.topo b/mutt/muttrc.topo index d0da89c..9f6d6ab 100644 --- a/mutt/muttrc.topo +++ b/mutt/muttrc.topo @@ -32,7 +32,6 @@ macro index,pager 'source ~/.config/mutt/muttr macro index,pager 'source ~/.config/mutt/muttrc.gmail!' macro index,pager 'source ~/.config/mutt/muttrc.b97602041!' -## ACCOUNT1 +# Hooks for accounts folder-hook imaps://imap.gmail.com/ 'source ~/.config/mutt/muttrc.gmail' -### ACCOUNT2 folder-hook ~/Maildir 'source ~/.config/mutt/muttrc.b97602041' -- cgit v1.2.3-70-g09d2