From ab4c35e47bb6ccfd7c3af77c66e7d3af195c9917 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Sun, 21 May 2017 16:22:39 +0200 Subject: mutt --- by_host/Darwin/mutt/.mutt/mailcap | 6 ++ by_host/Darwin/mutt/.mutt/open-in-safari | 8 +++ by_host/Linux/mutt/.mutt/mailcap | 10 +++ mutt/.mutt/mailcap | 10 --- mutt/.mutt/muttrc | 118 +++++++++++++++++++++++++++++++ mutt/.mutt/private.rc | 12 ++++ mutt/.mutt/work.rc | 16 +++-- 7 files changed, 164 insertions(+), 16 deletions(-) create mode 100644 by_host/Darwin/mutt/.mutt/mailcap create mode 100755 by_host/Darwin/mutt/.mutt/open-in-safari create mode 100644 by_host/Linux/mutt/.mutt/mailcap delete mode 100644 mutt/.mutt/mailcap create mode 100644 mutt/.mutt/muttrc create mode 100644 mutt/.mutt/private.rc diff --git a/by_host/Darwin/mutt/.mutt/mailcap b/by_host/Darwin/mutt/.mutt/mailcap new file mode 100644 index 0000000..a319c8c --- /dev/null +++ b/by_host/Darwin/mutt/.mutt/mailcap @@ -0,0 +1,6 @@ +image/*; cat - | open -W -F -n %s > /dev/null +text/html; ~/.mutt/open-in-safari %s +text/html; w3m -I %{charset} -O utf-8 -T text/html -dump %s; copiousoutput +text/*; cat - | open -W -F -n %s > /dev/null +application/*; cat - | open %s >/dev/null + diff --git a/by_host/Darwin/mutt/.mutt/open-in-safari b/by_host/Darwin/mutt/.mutt/open-in-safari new file mode 100755 index 0000000..0e122f5 --- /dev/null +++ b/by_host/Darwin/mutt/.mutt/open-in-safari @@ -0,0 +1,8 @@ +#!/bin/sh + +cp $1 $1.copy.html +( open -a Safari "$1.copy.html"; +sleep 30; +rm -f "$1.copy.html"; +) & + diff --git a/by_host/Linux/mutt/.mutt/mailcap b/by_host/Linux/mutt/.mutt/mailcap new file mode 100644 index 0000000..8aaaa7e --- /dev/null +++ b/by_host/Linux/mutt/.mutt/mailcap @@ -0,0 +1,10 @@ +text/html; firefox %s &>/dev/null; test=test -n "$DISPLAY"; needsterminal +text/html; w3m -I %{charset} -O utf-8 -T text/html -dump %s; copiousoutput +text/plain; less %s +application/x-pdf; zathura %s +application/pdf; zathura %s +application/octet-stream; zathura %s +image/jpeg; feh %s +image/pjpeg; feh %s +image/png; feh %s +image/gif; feh %s diff --git a/mutt/.mutt/mailcap b/mutt/.mutt/mailcap deleted file mode 100644 index 8aaaa7e..0000000 --- a/mutt/.mutt/mailcap +++ /dev/null @@ -1,10 +0,0 @@ -text/html; firefox %s &>/dev/null; test=test -n "$DISPLAY"; needsterminal -text/html; w3m -I %{charset} -O utf-8 -T text/html -dump %s; copiousoutput -text/plain; less %s -application/x-pdf; zathura %s -application/pdf; zathura %s -application/octet-stream; zathura %s -image/jpeg; feh %s -image/pjpeg; feh %s -image/png; feh %s -image/gif; feh %s diff --git a/mutt/.mutt/muttrc b/mutt/.mutt/muttrc new file mode 100644 index 0000000..4b96ff8 --- /dev/null +++ b/mutt/.mutt/muttrc @@ -0,0 +1,118 @@ +set mbox_type=Maildir +set folder="~/.mail/" +set alias_file = ~/.mutt/alias +set header_cache = ~/.mutt/cache/headers +set message_cachedir = ~/.mutt/cache/messages +set mailcap_path = ~/.mutt/mailcap +set signature = ~/.mutt/sig +set tmpdir = ~/.mutt/tmp +set realname = "Patrick Simianer" +set from = "p@simianer.de" +set use_from = yes +set sort = threads +set charset = "utf-8" +set send_charset = "utf-8" +set config_charset = "utf-8" +set locale = `echo "${LC_ALL:-${LC_TIME:-${LANG}}}"` +set read_inc = 1 +set sleep_time = 0 +auto_view text/html + +# macros +set wait_key = no +macro index,pager G "imapfilter -c ~/.imapfilter/private.lua &>/dev/null && mbsync private && notmuch new 2>/dev/null" +macro index,pager H "imapfilter -c ~/.imapfilter/work.lua &>/dev/null && mbsync work && notmuch new 2>/dev/null" +macro index,pager J "mbsync -a && notmuch new 2>/dev/null" +macro index m "T~N;WNT~O;WO\CT~T" "mark all messages read" +macro index c "?" "open a different folder" +macro pager c "?" "open a different folder" +macro index M "T.*\n;WN" "Mark all messages as read" + +# abook +set query_command = "abook --mutt-query '%s'" +bind editor complete-query + +# headers +ignore * +unignore from date subject to cc +hdr_order from to cc date subject + +# mailboxes +mailboxes \ ++private/inbox \ ++private/drafts \ ++private/all \ ++work/inbox \ ++work/drafts \ ++work/all \ ++work/lists + +# folder hooks +folder-hook private/* source ~/.mutt/private.rc +folder-hook work/* source ~/.mutt/work.rc +folder-hook . 'set read_inc=1' +folder-hook private/all 'set read_inc=1000' +folder-hook work/all 'set read_inc=1000' +folder-hook work/lists 'set read_inc=1000' + +# notmuch +macro index , "unset wait_keymutt-notmuch-py ~/.mail/tmp/results+tmp/results" "search mail (using notmuch)" + +# status bar +set status_chars = " *%A" +set status_format = "▅▅ %f ▅ %r%m messages %>▅ " + +# sidebar +bind index,pager sidebar-next +bind index,pager sidebar-prev +bind index,pager sidebar-open +set sidebar_divider_char = ' ' +set sidebar_visible = yes +set sidebar_width = 20 +set sidebar_format = '%B%> %!%?N? %N? ' +set sidebar_short_path = no +set sidebar_folder_indent = yes +set sidebar_indent_string = ' ' +set mail_check_stats = yes +set mail_check_stats_interval = 3 +set sidebar_new_mail_only = no +set mail_check = 3 + +# pager +set pager_index_lines = 20 +set pager_context = 3 +set pager_stop +set menu_scroll +set tilde +unset markers + +# colors +color normal color0 color231 +color error brightcolor15 color196 +color indicator color201 color255 +color status color243 color231 +color hdrdefault color245 color231 +color header color231 color0 "^(Subject): " +color signature color243 color231 +color body color21 color231 "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" +color body color21 color231 "((https?|ftp)://|www)+[\-\.\;@,/%~_:?&=\#a-zA-Z0-9+]+" +color quoted color243 color231 +color quoted1 color196 color231 +color quoted2 color22 color231 +color quoted3 color130 color231 +color quoted4 color51 color231 +color tilde color243 color231 +color tree color238 color231 +color attachment color196 color231 +color index color201 color231 "~N" +color index color243 color231 "~P" +color index brightcolor221 color231 "~F" +color index brightcolor39 color231 "~T" +color index color196 color231 "~D" +color sidebar_new black white +color sidebar_flagged black white +unset help + +# default private +source ~/.mutt/private.rc + diff --git a/mutt/.mutt/private.rc b/mutt/.mutt/private.rc new file mode 100644 index 0000000..53d8713 --- /dev/null +++ b/mutt/.mutt/private.rc @@ -0,0 +1,12 @@ +color status blue color231 +color sidebar_divider color231 blue +color sidebar_highlight blue white + +set from = "p@simianer.de" +set sendmail = "/Users/pks/.local/bin/msmtp -a private" +set record = "+private/all" +set postponed = "+private/drafts" +set spoolfile = "+private/inbox" + +macro index,pager S "+private/all" + diff --git a/mutt/.mutt/work.rc b/mutt/.mutt/work.rc index cce5baf..a233eb4 100644 --- a/mutt/.mutt/work.rc +++ b/mutt/.mutt/work.rc @@ -1,8 +1,12 @@ -color status red color231 +color status red color231 +color sidebar_divider color231 red +color sidebar_highlight red white + set from = "simianer@cl.uni-heidelberg.de" -set sendmail = "/usr/bin/msmtp -a work" -set record = "+simianer@cl.uni-heidelberg.de/all" -set postponed = "+simianer@cl.uni-heidelberg.de/drafts" -macro index,pager S "+simianer@cl.uni-heidelberg.de/all" -set spoolfile = "+simianer@cl.uni-heidelberg.de/inbox" +set sendmail = "/Users/pks/.local/bin/msmtp -a work" +set record = "+work/all" +set postponed = "+work/drafts" +set spoolfile = "+work/inbox" + +macro index,pager S "+work/all" -- cgit v1.2.3