From 82dd65151bf2bf047f484fe664b34f72f57302b5 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 12 May 2021 16:44:12 +0200 Subject: [mutt] use xdg-mime to determine mime types and add mailcap file --- mailcap | 9 +++++++++ muttrc | 3 +++ setup.py | 3 ++- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 mailcap diff --git a/mailcap b/mailcap new file mode 100644 index 0000000..9250865 --- /dev/null +++ b/mailcap @@ -0,0 +1,9 @@ +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/muttrc b/muttrc index 345f620..62bd2cb 100644 --- a/muttrc +++ b/muttrc @@ -47,6 +47,9 @@ set query_command= "khard email --parsable %s" bind editor complete-query bind editor ^T complete +# use xdg-mime to determine mime types +set mime_type_query_command = "xdg-mime query filetype" + ############## COLOR ####################### source ~/.mutt/theme diff --git a/setup.py b/setup.py index b1ebf7d..f463a64 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,8 @@ def dotfile_loc_helper(quiet): return e mutt_target = [("muttrc", home_dir + "/.muttrc"), - ("mutt", home_dir + "/.mutt")] + ("mutt", home_dir + "/.mutt"), + ("mailcap", home_dir + "/.mailcap")] # targets are a list of tuples and/or functions targets = { -- cgit v1.2.3