From fe69f5ba615224f3277ff53c23320b66c47c53b1 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 9 Jul 2021 18:22:48 +0200 Subject: [mutt] add more vi bindings, correct mailcap file, diff highlighting, io_uring mailinglist --- mailcap | 9 --------- mutt/bindings | 10 ++++++++++ mutt/mailcap | 13 +++++++++++++ mutt/mailinglists | 1 + muttrc | 16 ++++++++++++++++ setup.py | 3 +-- 6 files changed, 41 insertions(+), 11 deletions(-) delete mode 100644 mailcap create mode 100644 mutt/mailcap diff --git a/mailcap b/mailcap deleted file mode 100644 index 9250865..0000000 --- a/mailcap +++ /dev/null @@ -1,9 +0,0 @@ -audio/*; /usr/bin/xdg-open %s - -image/*; imv %s; test=test -n "$DISPLAY" - -application/msword; /usr/bin/xdg-open %s -application/pdf; /usr/bin/xdg-open %s -application/postscript ; /usr/bin/xdg-open %s - -text/html; /usr/bin/xdg-open %s ; copiousoutput diff --git a/mutt/bindings b/mutt/bindings index 1d7fb15..071e4c6 100644 --- a/mutt/bindings +++ b/mutt/bindings @@ -9,6 +9,16 @@ bind index gg first-entry bind pager G bottom bind index G last-entry +# Scrolling +bind attach,browser,pager,index \CF next-page +bind attach,browser,pager,index \CB previous-page +bind attach,browser,pager,index \Cu half-up +bind attach,browser,pager,index \Cd half-down +bind browser,pager \Ce next-line +bind browser,pager \Cy previous-line +bind index \Ce next-line +bind index \Cy previous-line + bind index,pager \Cd purge-message # Sidebar Navigation diff --git a/mutt/mailcap b/mutt/mailcap new file mode 100644 index 0000000..07f72c8 --- /dev/null +++ b/mutt/mailcap @@ -0,0 +1,13 @@ +### +### Begin Red Hat Mailcap +### + +audio/*; /usr/bin/xdg-open %s + +image/*; /usr/bin/xdg-open %s + +application/msword; /usr/bin/xdg-open %s +application/pdf; /usr/bin/xdg-open %s +application/postscript ; /usr/bin/xdg-open %s + +text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -collapse_br_tags -dump %s; nametemplate=%s.html; copiousoutput diff --git a/mutt/mailinglists b/mutt/mailinglists index e5eff7f..ede5b9b 100644 --- a/mutt/mailinglists +++ b/mutt/mailinglists @@ -1,2 +1,3 @@ subscribe info@fsf.org subscribe oeffentlich@erlangen.ccc.de +subscribe io-uring@vger.kernel.org diff --git a/muttrc b/muttrc index 62bd2cb..fa5d24e 100644 --- a/muttrc +++ b/muttrc @@ -50,8 +50,24 @@ bind editor ^T complete # use xdg-mime to determine mime types set mime_type_query_command = "xdg-mime query filetype" +set mailcap_path = ~/.mutt/mailcap + ############## COLOR ####################### +# Patch syntax highlighting +# https://www.do-not-panic.com/2014/07/colored-diffs-with-mutt.html +color normal white default +color body brightwhite default ^[[:space:]].* +color body brightwhite default ^(diff).* +color body white default ^[\-\-\-].* +color body white default ^[\+\+\+].* +color body green default ^[\+].* +color body red default ^[\-].* +color body brightblue default [@@].* +color body brightwhite default ^(\s).* +color body brightwhite default ^(Signed-off-by).* +color body brightwhite default ^(Cc) + source ~/.mutt/theme ############ STATUSBAR ##################### diff --git a/setup.py b/setup.py index 18064e6..613331b 100755 --- a/setup.py +++ b/setup.py @@ -68,8 +68,7 @@ def dotfile_loc_helper(quiet): return e mutt_target = [("muttrc", home_dir + "/.muttrc"), - ("mutt", home_dir + "/.mutt"), - ("mailcap", home_dir + "/.mailcap")] + ("mutt", home_dir + "/.mutt")] # targets are a list of tuples and/or functions targets = { -- cgit v1.2.3