From a81487deb74f4112d765aef56d748016acc3ef88 Mon Sep 17 00:00:00 2001 From: Steffen Rademacker Date: Sun, 19 Mar 2017 14:20:44 +0100 Subject: [PATCH] Add mutt config start point --- office/mutt/accounts/hsv | 29 +++++++++ office/mutt/accounts/kfi | 29 +++++++++ office/mutt/accounts/mailbox | 29 +++++++++ office/mutt/accounts/mf | 29 +++++++++ office/mutt/accounts/viu | 29 +++++++++ office/mutt/bindings | 46 +++++++++++++ office/mutt/colors | 46 +++++++++++++ office/mutt/mailcap | 19 ++++++ office/mutt/muttrc | 114 +++++++++++++++++++++++++++++++++ office/mutt/signatures/default | 4 ++ office/mutt/signatures/hsv | 7 ++ office/mutt/signatures/work | 8 +++ 12 files changed, 389 insertions(+) create mode 100644 office/mutt/accounts/hsv create mode 100644 office/mutt/accounts/kfi create mode 100644 office/mutt/accounts/mailbox create mode 100644 office/mutt/accounts/mf create mode 100644 office/mutt/accounts/viu create mode 100644 office/mutt/bindings create mode 100644 office/mutt/colors create mode 100644 office/mutt/mailcap create mode 100644 office/mutt/muttrc create mode 100644 office/mutt/signatures/default create mode 100644 office/mutt/signatures/hsv create mode 100644 office/mutt/signatures/work diff --git a/office/mutt/accounts/hsv b/office/mutt/accounts/hsv new file mode 100644 index 0000000..34e3eb2 --- /dev/null +++ b/office/mutt/accounts/hsv @@ -0,0 +1,29 @@ +set from = "s.rademacker@hoerspielsommer.de" +set sendmail = "/usr/local/bin/msmtp -a hsv" + +# Set folders +set spoolfile = "+hsv/INBOX" +set mbox = "+hsv/archive" +set postponed = "+hsv/drafts" +set record = "+hsv/sent" +set trash = "+hsv/trash" + +# Alternate email addresses. +alternates ^s.rademacker@hoerspielsommer.de$ + +# custom signaure +set signature = ~/.mutt/signatures/hsv + +color status magenta default + +macro index o "mbsync hsv" "run mbsync to sync mail for this account" + +macro index,pager J \ + "set my_old_resolve=\$resolve noresolve\ + nset resolve=\$my_old_resolve\ + +hsv/junk" \ + "mark as read and move to junk folder" + +macro index,pager A \ + "+hsv/archive" \ + "move message to the archive" diff --git a/office/mutt/accounts/kfi b/office/mutt/accounts/kfi new file mode 100644 index 0000000..705c888 --- /dev/null +++ b/office/mutt/accounts/kfi @@ -0,0 +1,29 @@ +set from = "steffen.rademacker@kf-interactive.com" +set sendmail = "/usr/local/bin/msmtp -a kfi" + +# Set folders +set spoolfile = "+kfi/INBOX" +set mbox = "+kfi/archive" +set postponed = "+kfi/drafts" +set record = "+kfi/sent" +set trash = "+kfi/trash" + +# Alternate email addresses. +alternates ^steffen.rademacker@kf-interactive.com$ + +# custom signaure +set signature = ~/.mutt/signatures/default + +color status green default + +macro index o "mbsync kfi" "run mbsync to sync mail for this account" + +macro index,pager J \ + "set my_old_resolve=\$resolve noresolve\ + nset resolve=\$my_old_resolve\ + +kfi/junk" \ + "mark as read and move to junk folder" + +macro index,pager A \ + "+kfi/archive" \ + "move message to the archive" diff --git a/office/mutt/accounts/mailbox b/office/mutt/accounts/mailbox new file mode 100644 index 0000000..3f1eea3 --- /dev/null +++ b/office/mutt/accounts/mailbox @@ -0,0 +1,29 @@ +set from = "kontakt@webgefrickel.de" +set sendmail = "/usr/local/bin/msmtp -a mailbox" + +# Set folders +set spoolfile = "+mailbox/INBOX" +set mbox = "+mailbox/archive" +set postponed = "+mailbox/drafts" +set record = "+mailbox/sent" +set trash = "+mailbox/trash" + +# Alternate email addresses. +alternates ^kontakt@webgefrickel.de$ ^s.rademacker@mailbox.org$ + +# custom signaure +set signature = ~/.mutt/signatures/work + +color status cyan default + +macro index o "mbsync mailbox" "run mbsync to sync mail for this account" + +macro index,pager J \ + "set my_old_resolve=\$resolve noresolve\ + nset resolve=\$my_old_resolve\ + +mailbox/junk" \ + "mark as read and move to junk folder" + +macro index,pager A \ + "+mailbox/archive" \ + "move message to the archive" diff --git a/office/mutt/accounts/mf b/office/mutt/accounts/mf new file mode 100644 index 0000000..f0c66e8 --- /dev/null +++ b/office/mutt/accounts/mf @@ -0,0 +1,29 @@ +set from = "s.rademacker@medienfreunde.com" +set sendmail = "/usr/local/bin/msmtp -a mf" + +# Set folders +set spoolfile = "+mf/INBOX" +set mbox = "+mf/archive" +set postponed = "+mf/drafts" +set record = "+mf/sent" +set trash = "+mf/trash" + +# Alternate email addresses. +alternates ^s.rademacker@medienfreunde.com$ + +# custom signaure +set signature = ~/.mutt/signatures/default + +color status blue default + +macro index o "mbsync mf" "run mbsync to sync mail for this account" + +macro index,pager J \ + "set my_old_resolve=\$resolve noresolve\ + nset resolve=\$my_old_resolve\ + +mf/junk" \ + "mark as read and move to junk folder" + +macro index,pager A \ + "+mf/archive" \ + "move message to the archive" diff --git a/office/mutt/accounts/viu b/office/mutt/accounts/viu new file mode 100644 index 0000000..04b8f4f --- /dev/null +++ b/office/mutt/accounts/viu @@ -0,0 +1,29 @@ +set from = "steffen.rademacker@viu.ch" +set sendmail = "/usr/local/bin/msmtp -a viu" + +# Set folders +set spoolfile = "+viu/INBOX" +set mbox = "+viu/archive" +set postponed = "+viu/drafts" +set record = "+viu/sent" +set trash = "+viu/trash" + +# Alternate email addresses. +alternates ^steffen.rademacker@viu.ch$ + +# custom signaure +set signature = ~/.mutt/signatures/default + +color status red default + +macro index o "mbsync viu" "run mbsync to sync mail for this account" + +macro index,pager J \ + "set my_old_resolve=\$resolve noresolve\ + nset resolve=\$my_old_resolve\ + +viu/junk" \ + "mark as read and move to junk folder" + +macro index,pager A \ + "+viu/archive" \ + "move message to the archive" diff --git a/office/mutt/bindings b/office/mutt/bindings new file mode 100644 index 0000000..4ad3315 --- /dev/null +++ b/office/mutt/bindings @@ -0,0 +1,46 @@ +# some keybindings +bind index gg first-entry +bind index G last-entry +bind index R group-reply +bind index sync-mailbox +bind index collapse-thread + +# pager Key Bindings +bind pager k previous-line +bind pager j next-line +bind pager gg top +bind pager G bottom +bind pager R group-reply + +# View attachments properly. +bind attach view-mailcap + +bind compose P postpone-message +bind index p recall-message + +# using neomutts trash patch +bind index,pager D purge-message + +# Sync all email +macro index O "mbsync -a && mu index --maildir ~/Mail" "run mbsync and mu to sync all mail" + +# Save all attachments +macro index S "ripmime -i - -d ~/Downloads" "Save all attachments using ripmime" + +# write a new email to the sender of selected email +bind index,pager @ compose-to-sender + +# opening urls with urlscan +macro index,pager \cb " urlscan" "call urlscan to extract URLs out of a message" +macro attach,compose \cb " urlscan" "call urlscan to extract URLs out of a message" + +# finding stuff +bind editor complete-query +macro index F "mu find --clearlinks --format=links --linksdir=~/.mu/results " "mu find" +macro index \cf "~/.mu/results" "mu find results" + +# Sidebar Navigation +bind index,pager sidebar-next +bind index,pager sidebar-prev +bind index,pager sidebar-open + diff --git a/office/mutt/colors b/office/mutt/colors new file mode 100644 index 0000000..c64afab --- /dev/null +++ b/office/mutt/colors @@ -0,0 +1,46 @@ +# basic colors --------------------------------------------------------- +color normal white default +color error red default +color tilde black default +color message cyan default +color markers red white +color attachment white default +color search brightmagenta default +color indicator brightblack yellow +color tree green default + +# sidebarh +color sidebar_new default blue + +# index ---------------------------------------------------------------- + +color index red default "~A" # all messages +color index brightred default "~E" # expired messages +color index blue default "~N" # new messages +color index blue default "~O" # old messages +color index brightmagenta default "~Q" # messages that have been replied to +color index brightwhite default "~R" # read messages +color index blue default "~U" # unread messages +color index brightyellow default "~v" # messages part of a collapsed thread +color index brightyellow default "~P" # messages from me +color index red default "~F" # flagged messages +color index black red "~D" # deleted messages + +# message headers ------------------------------------------------------ + +color hdrdefault brightgreen default +color header brightyellow default "^(From)" +color header blue default "^(Subject)" + +# body ----------------------------------------------------------------- + +color quoted blue default +color quoted1 cyan default +color quoted2 yellow default +color quoted3 red default +color quoted4 brightred default + +color signature brightblack default +color bold black default +color underline black default +color normal default default diff --git a/office/mutt/mailcap b/office/mutt/mailcap new file mode 100644 index 0000000..077074b --- /dev/null +++ b/office/mutt/mailcap @@ -0,0 +1,19 @@ +# MS Word documents +application/msword; ~/dotfiles/office/view-attachment.sh %s "-" '/Applications/LibreOffice.app' +application/vnd.ms-excel; ~/dotfiles/office/view-attachment.sh %s "-" '/Applications/LibreOffice.app' +application/vnd.openxmlformats-officedocument.presentationml.presentation; ~/dotfiles/office/view-attachment.sh %s "-" '/Applications/LibreOffice.app' +application/vnd.oasis.opendocument.text; ~/dotfiles/office/view-attachment.sh %s "-" '/Applications/LibreOffice.app' + +# Images +image/jpg; ~/dotfiles/office/quicklook.sh %s jpg +image/jpeg; ~/dotfiles/office/quicklook.sh %s jpg +image/pjpeg; ~/dotfiles/office/quicklook.sh %s jpg +image/png; ~/dotfiles/office/quicklook.sh %s png +image/gif; ~/dotfiles/office/quicklook.sh %s gif +application/pdf; ~/dotfiles/office/quicklook.sh %s pdf + +# HTML +text/html; w3m -I %{charset} -T text/html; copiousoutput; + +# Unidentified files +application/octet-stream; ~/dotfiles/office/view-attachment.sh %s "-" diff --git a/office/mutt/muttrc b/office/mutt/muttrc new file mode 100644 index 0000000..12941f6 --- /dev/null +++ b/office/mutt/muttrc @@ -0,0 +1,114 @@ +# paths +set folder = ~/Mail +set header_cache = ~/.mutt/cache/headers +set message_cachedir = ~/.mutt/cache/bodies +set certificate_file = ~/dotfiles/office/certificates.crt +set mailcap_path = ~/.mutt/mailcap +set tmpdir = ~/.mutt/tmp + +# basic options +set wait_key = no +set mbox_type = Maildir +set timeout = 3 +set mail_check = 0 +set delete +set quit +set thorough_search +unset confirmappend +unset move +unset mark_old +unset beep_new + +# compose View Options +set envelope_from # which from? +set edit_headers # show headers when composing +set fast_reply # skip to compose when replying +set askcc # ask for CC: +set fcc_attach # save attachments with the body +set forward_format = "Fwd: %s" # format of subject when forwarding +set forward_decode # decode when forwarding +set attribution = "On %d, %n wrote:" # format of quoting header +set reply_to # reply to Reply to: field +set reverse_name # reply as whomever it was to +set include # include message in replies +set forward_quote # include message in forwards +set editor = "nvim" +set text_flowed +unset sig_dashes # no dashes before sig +unset mime_forward # forward attachments as part of body + +# status bar, date format, finding stuff etc. +set status_chars = " *%A" +set status_format = "[ Folder: %f ] [%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]%>─%?p?( %p postponed )?" +set date_format = "%d.%m.%Y %H:%M" +set index_format = "[%Z] %?X?A&-? %D %-20.20F %s" +set sort = threads +set sort_aux = reverse-last-date-received +set uncollapse_jump +set sort_re +set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" +set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" +set send_charset = "utf-8:iso-8859-1:us-ascii" +set charset = "utf-8" + +# when composing emails, use this command to get addresses from +# the addressbook with khard first, and everything else from mu index +set query_command = "khard email --parsable '%s' && mu cfind --format=mutt-ab '%s' | sed -n '1!p'" + +# Pager View Options +set pager_index_lines = 10 +set pager_context = 3 +set pager_stop +set menu_scroll +set tilde +unset markers + +# email headers and attachments +ignore * +unignore from: to: cc: bcc: date: subject: +unhdr_order * +hdr_order from: to: cc: bcc: date: subject: +alternative_order text/plain text/enriched text/html +auto_view text/html + +# sidebar patch config +set sidebar_visible +set sidebar_short_path +set sidebar_folder_indent +set sidebar_width = 25 +set sidebar_divider_char = ' | ' +set sidebar_indent_string = ' '' +set sidebar_format = "%B %* [%?N?%N / ?%S]" +set mail_check_stats + +# Mailboxes to show in the sidebar. +mailboxes =mailbox +mailboxes =mailbox/INBOX =mailbox/sent =mailbox/archive =mailbox/drafts =mailbox/junk =mailbox/trash +mailboxes =viu +mailboxes =viu/INBOX =viu/sent =viu/archive =viu/drafts =viu/junk =viu/trash +mailboxes =mf +mailboxes =mf/INBOX =mf/sent =mf/archive =mf/drafts =mf/junk =mf/trash +mailboxes =kfi +mailboxes =kfi/INBOX =kfi/sent =kfi/archive =kfi/drafts =kfi/junk =kfi/trash +mailboxes =hsv +mailboxes =hsv/INBOX =hsv/sent =hsv/archive =hsv/drafts =hsv/junk =hsv/trash + +# source colors and keybindings +# keeping those in one place makes it easier for my brain +source ~/.mutt/colors +source ~/.mutt/bindings + +# And finally the account config for multiple accounts +############################################################# + +# by default, use mailbox +set realname = "Steffen Rademacker" +set spoolfile = "+mailbox/INBOX" +source ~/.mutt/accounts/mailbox + +# when changing into other mailboxes, use different adresses etc. +folder-hook mailbox/* source ~/.mutt/accounts/mailbox +folder-hook kfi/* source ~/.mutt/accounts/kfi +folder-hook viu/* source ~/.mutt/accounts/viu +folder-hook hsv/* source ~/.mutt/accounts/hsv +folder-hook mf/* source ~/.mutt/accounts/mf diff --git a/office/mutt/signatures/default b/office/mutt/signatures/default new file mode 100644 index 0000000..1cb87b6 --- /dev/null +++ b/office/mutt/signatures/default @@ -0,0 +1,4 @@ + +Viele Grüße +Steffen Rademacker + diff --git a/office/mutt/signatures/hsv b/office/mutt/signatures/hsv new file mode 100644 index 0000000..db0815b --- /dev/null +++ b/office/mutt/signatures/hsv @@ -0,0 +1,7 @@ + +-- +Steffen Rademacker +Hörspielsommer e.V. +s.rademacker@hoerspielsommer.de +https://hoerspielsommer.de + diff --git a/office/mutt/signatures/work b/office/mutt/signatures/work new file mode 100644 index 0000000..bfaa1ab --- /dev/null +++ b/office/mutt/signatures/work @@ -0,0 +1,8 @@ + +-- +Steffen Rademacker +Web Development ++49 177 55 33 074 +kontakt@webgefrickel.de +https://webgefrickel.de +