diff options
-rw-r--r-- | accounts/philip.rc | 51 | ||||
-rw-r--r-- | accounts/philip.sig.rc | 3 | ||||
-rwxr-xr-x | bin/add_to_calcurse | 25 | ||||
-rwxr-xr-x | bin/display_filter.sh | 53 | ||||
-rwxr-xr-x | bin/get-mailboxes.sh | 17 | ||||
-rwxr-xr-x | bin/mutt-trim | 171 | ||||
-rwxr-xr-x | bin/mutt_bgrun | 114 | ||||
-rwxr-xr-x | bin/mutt_version | 5 | ||||
-rwxr-xr-x | bin/print_unicode.sh | 37 | ||||
-rw-r--r-- | mailcap | 11 | ||||
-rw-r--r-- | mutt-128.png | bin | 0 -> 9929 bytes | |||
-rw-r--r-- | mutt.svg | 255 | ||||
-rw-r--r-- | neomuttrc | 171 | ||||
-rw-r--r-- | themes/venelles.rc | 78 |
14 files changed, 991 insertions, 0 deletions
diff --git a/accounts/philip.rc b/accounts/philip.rc new file mode 100644 index 0000000..96a0cf5 --- /dev/null +++ b/accounts/philip.rc @@ -0,0 +1,51 @@ +# @File Name : philip.rc + +# base +set realname = "Philip Wittamore" +set from = "philip@wittamore.com" +set use_from = "yes" +set envelope_from = "yes" + +# +set sendmail = "/usr/bin/msmtp -a philip" +set mbox_type = Maildir + +# folders +set folder=~/.mail/philip/ +set spoolfile = "+Inbox" +set trash = "+Trash" +set postponed = "+Drafts" +set record = "+Sent" + +# dsn +set dsn_notify = "failure,delay" +set dsn_return = hdrs + +# sidebar +unmailboxes * +mailboxes `~/neomutt/bin/get-mailboxes.sh ~/.mail/philip` + +# GPG +#set crypt_use_gpgme=yes +#set crypt_reply_sign=yes +#set crypt_reply_encrypt=yes +#set crypt_reply_sign_encrypted=yes +#set crypt_autosign=yes +#set crypt_verify_sig=yes + +#set pgp_default_key="9FD4104BF8734069C65C9E7062C85864C0420C9A" +#set pgp_autosign=yes +#set pgp_replyencrypt=yes +#set pgp_replysign=yes +#set pgp_timeout=1800 + +# signature +set sig_on_top = yes +set sig_dashes = yes +set signature = "iconv -f utf-8 ~/neomutt/accounts/philip.sig.rc|" + +# +subscribe neomutt-users + +# macros +macro index <F6> "<shell-escape>mbsync philip<enter>" diff --git a/accounts/philip.sig.rc b/accounts/philip.sig.rc new file mode 100644 index 0000000..35f6165 --- /dev/null +++ b/accounts/philip.sig.rc @@ -0,0 +1,3 @@ +Philip Wittamore +https://wittamore.com + diff --git a/bin/add_to_calcurse b/bin/add_to_calcurse new file mode 100755 index 0000000..4807854 --- /dev/null +++ b/bin/add_to_calcurse @@ -0,0 +1,25 @@ +#!/bin/bash +# +# Import text/calendar files from mutt +# to calcurse. +# + +# Make sure calcurse is running +if [ ! -f "$HOME/.calcurse/.calcurse.pid" ]; then + exit 1 +fi + +# Extract the attachments +TEMPDIR=$(mktemp -d add-to-calcurse.XXXXXXXX) +cat "$@" | uudeview -i -m -n -q -p $TEMPDIR - > /dev/null 2>&1 + +# Add the calendar file (last attachment) to calcurse +# bartimoonboots update +FILE=$(file $TEMPDIR/* | grep vCalendar | cut -d: -f1 | head -1) +calcurse -i $FILE > /dev/null 2>&1 +#FILE=$(ls $TEMPDIR | sort -r | head -1) +#calcurse -i "$TEMPDIR/$FILE" > /dev/null 2>&1 + +# Remove the temporary dir and trigger a reload in calcurse +rm -rf $TEMPDIR > /dev/null 2>&1 +kill -USR1 `cat $HOME/.calcurse/.calcurse.pid` > /dev/null 2>&1 diff --git a/bin/display_filter.sh b/bin/display_filter.sh new file mode 100755 index 0000000..e45bf02 --- /dev/null +++ b/bin/display_filter.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# lun. 29 mars 2021 09:05:05 CEST +# Neomutt display_filter.sh +# filter for pager display only + +sed -e ' + +# clean up neomutt notifications +/\[-- Visualisation.* --\]/d +/\[-- Type: text.* --\]/d +/\[-- Type.* --\]/d +/\[-- Pièce jointe #[0-9] --\]/d +s/Pièce jointe #[0-9]: //g +/\[-- .* pas disponible .* --\]/d + +# url tidy +# put each url on a new line +s/http/\nhttp/g +# replace last /blahblah with /... +#s|\(http.*\)/.*|\1\/...| + +# hide messy inline pdf +/^%PDF-1.4/,/^%%EOF/d + +# add newline after --] +s/--\]/--\]\n/g + +# CID +s/\[cid/\n\[cid/g + +# delete [img] tags +s/\[img\]//g + +# change ugly lines +s/━/-/g + +# remove last < +s/<*$// + +# remove lone [ +s/^\[$// + +# delete single spaces at the beginning of lines +s/^ //g + +# delete multiple spaces +s/[[:space:]]\+/ /g + +# delete multiple blank lines + +' | awk '!NF {if (++n <= 1) print; next}; {n=0;print}' + + diff --git a/bin/get-mailboxes.sh b/bin/get-mailboxes.sh new file mode 100755 index 0000000..e1ff8ef --- /dev/null +++ b/bin/get-mailboxes.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +maildir=$1 + +# Find these specific paths so they stick at the top of the list +MAILBOXES='"+Inbox" "+Sent" "+Trash" "+Drafts" "+Junk" ' + +#Find all other paths, excluding those from above +MAILBOXES=$MAILBOXES`find "$maildir" -type d -name cur \ + -a -not \( -ipath "*Inbox*" \ + -o -ipath "*Sent*" \ + -o -ipath "*Drafts*" \ + -o -ipath "*Trash*" \ + -o -ipath "*Junk*" \ + \) | sed -e 's/${maildir}//g' -e 's/\/cur$/\"/g' -e "s#^${maildir}/# \"+#" | sort` + +echo $MAILBOXES diff --git a/bin/mutt-trim b/bin/mutt-trim new file mode 100755 index 0000000..2378ea6 --- /dev/null +++ b/bin/mutt-trim @@ -0,0 +1,171 @@ +#!/usr/bin/perl +# +# "Beautify" quoted message and make it "ready-to-reply". Originally by Michael Velten. + +use utf8; + +# keep quotes nested up to 3rd level +my $ind_max = 3; +# # put 1 empty line between first and following quote +# my $gap = 1; + +my $name = '[[:alpha:]]+([\'`-][[:alpha:]]+|[.])*'; +my $fullname = '\b(' . $name . '[,]?\s+)*' . $name . '\b'; + +# Possible reply greetings (regexes) (note that '> ' will be prefixed) +my @greetings = ( + 'Dear\s+' . $fullname . '([,.]|\s*!)?', + '[Hh](ello|i|ey)' . '(\s+' . $fullname . ')?' . '([,.]|\s*!)?', + 'Sehr geehrter?\s+' . $fullname . '([,.]|\s*!)?', + 'Lieber?\s+' . $fullname . '([,.]|\s*!)?', + 'Guten Tag' . '(\s+' . $fullname . ')?' . '([,.]|\s*!)?', + '[Hh]allo' . '(\s+' . $fullname . ')?' . '([,.]|\s*!)?', + '[Mm]oin' . '(\s+' . $fullname . ')?' . '([,.]|\s*!)?', + '[Mm]esdames(,| et) [Mm]essieurs([,.]|\s*!)?', + 'M(adame)\s+' . $fullname . '([,.]|\s*!)?', + 'M(onsieur)\s+' . $fullname . '([,.]|\s*!)?', + '[Cc]her\s+' . $fullname . '([,.]|\s*!)?', + '[Cc]hère\s+' . $fullname . '([,.]|\s*!)?', + '[Bb]onjour' . '(\s+' . $fullname . ')?' . '([,.]|\s*!)?', + '[Ss]alut' . '(\s+' . $fullname . ')?' . '([,.]|\s*!)?', + 'Senhor(ita|a)?' . '(\s+' . $fullname . ')?' . '([,.]|\s*!)?', + 'Sra?\.?' . '(\s+' . $fullname . ')?' . '([,.]|\s*!)?', + 'Car(íssim)?[ao]s?' . '(\s+' . $fullname . ')?' . '([,.]|\s*!)?', + 'Prezad(íssim)?[ao]s?' . '(\s+' . $fullname . ')?' . '([,.]|\s*!)?', + 'Estimad(íssim)?[ao]s?' . '(\s+' . $fullname . ')?' . '([,.]|\s*!)?', + '[Bb]om [Dd]ia' . '(\s+' . $fullname . ')?' . '([,.]|\s*!)?', + '[Bb]oa ([Tt]arde|[Nn]oite)' . '(\s+' . $fullname . ')?' . '([,.]|\s*!)?', + '[Oo](i|lá|la)' . '(\s+' . $fullname . ')?' . '([,.]|\s*!)?', + '[Aa]l[ôo]' . '(\s+' . $fullname . ')?' . '([,.]|\s*!)?', + '[Hh]ola' . '(\s+' . $fullname . ')?' . '([,.]|\s*!)?', + 'Se[ñ]or(ita|a)?' . '(\s+' . $fullname . ')?' . '([,.]|\s*!)?', + ); + +# Possible reply "greetouts" (regexes) (note that '> ' will be prefixed) +my @greetouts = ( + '([Ww]ith )?(([Kk]ind|[Bb]est|[Ww]arm) )?([Rr]egards|[Ww]ishes)([,.]|\s*!)?', + '[Bb]est([,.]|\s*!)?', + '[Cc]heers([,.]|\s*!)?', + '[Mm]it ([Vv]iel|[Bb]est|[Ll]ieb|[Ff]reundlich)en [Gg]r([ü]|ue)([ß]|ss)en([,.]|\s*!)?', + '(([Vv]iel|[Bb]est|[Ll]ieb|[Ff]reundlich)e )?[Gg]r([ü]|ue)([ß]|ss)e([,.]|\s*!)?', + '(([[Bb]est|[Ll]ieb|[Ff]reundlich)e[rn] )?[Gg]ru([ß]|ss)([,.]|\s*!)?', + '[Mm]it (([[Bb]est|[Ll]ieb|[Ff]reundlich)em )?[Gg]ru([ß]|ss)([,.]|\s*!)?', + '([LV]|MF)G([,.]|\s*!)?', + '(([Tt]rès|[Bb]ien) )?([Cc]ordi|[Aa]mic)alement([,.]|\s*!)?', + '[Aa]miti[é]s?([,.]|\s*!)?', + '[Aa]tenciosamente([,.]|\s*!)?', + '[Aa]tt([,.]|\s*!)?', + '[Aa]abraços?([,.]|\s*!)?', + '[Aa]tentamente([,.]|\s*!)?', + '[Cc]ordialmente([,.]|\s*!)?', + ); + +my $word = '[[:alpha:]]+([\'`-][[:alpha:]]+)*'; + +# my $saw_greeting = 0; +# my $saw_leadin = 0; +# my $saw_greetout = 0; +my $saw_own_sig = 0; +my $saw_blank_line = 0; +my $inds_other_sig = 0; +my $quote_header = 0; +my $extra_pref = ''; +# my $prev_inds = 0; + +my (@mail, @purged_mail); + +my $msg = shift; +die "Usage: $0 MAIL" unless $msg; +open(MAIL, "+<:encoding(UTF-8)", $msg) or die "$0: Can't open $msg: $!"; +push(@mail, $_) while <MAIL>; # Read whole mail + +# Process whole mail +LINE: +foreach my $line (@mail) { + +# Treat non-quoted lines as is + if ($line !~ /^>/) { + push(@purged_mail, $line); + next LINE; + } + +# Keep all lines after my own signature unmodified + if ($line =~ /^--\s?$/ || $saw_own_sig) { + $saw_own_sig = 1; + push(@purged_mail, $line); + next LINE; + } + + # $line =~ tr/\xA0/ /; +# tighten "> > " to ">> " + my ($pref, $suff) = $line =~ /^([>[:space:]]+)(.*)$/; + $pref =~ s/(>\s*(?!$))/>/g; +# reduce multiple pre- and post-blanks to one post-blank + $pref =~ s/^\s*(>+)\s*/$1 /; + $line = $pref . $suff . "\n"; + +# prepend additional '>' for each Outlook quote header + if ($line =~ /^>+ [-_=]{3,}\s*$word(\s+$word)*\s*[-_=]{3,}$/) { + $quote_header = 1; + next LINE; + } +# first line after Outlook quote header that does not start with ...: + if ($quote_header == 1 && $line !~ /^>+ ([-*]\s*)?$word(\s+$word)*\s*:\s+/) { + $extra_pref = '>' . $extra_pref; + $quote_header = 0; + } + $pref = $extra_pref . $pref; + $line = $pref . $suff . "\n"; + +# skip line if number of '>'s is greater than $ind_max + my $inds = $pref =~ tr/>//; + next LINE if $inds > $ind_max; + +# Remove other signatures + if ($line =~ /^>+ --\s?$/) { + $inds_other_sig = $inds; + } + if ($inds == $inds_other_sig) { + next LINE; + } else { + $inds_other_sig = 0; + } + +# Remove quoted greeting + # unless ($saw_greeting) { + foreach my $greeting (@greetings) { + if ($line =~ /^>+ $greeting$/) { + # $saw_greeting = 1; + next LINE; + } + } + # } + +# Remove quoted "greetout" + # unless ($saw_greetout) { + foreach my $greetout (@greetouts) { + if ($line =~ /^>+ $greetout$/) { + # $saw_greetout = 1; + next LINE; + } + } + # } + +# Remove quoted filler lines + if ($line =~ /^>+ \s*(-*|_*|=*|\+*|#*|\**)$/) { + next LINE; + } + +# Insert $gap empty lines between different quote levels + # $line = "\n" x $gap . $line if $prev_inds < $inds; + # $prev_inds = $inds; + +# Save purged line + push(@purged_mail, $line); +} + +# Overwrite original mail with purged mail +truncate(MAIL, 0); +seek(MAIL, 0, 0); +print MAIL @purged_mail; +close(MAIL); diff --git a/bin/mutt_bgrun b/bin/mutt_bgrun new file mode 100755 index 0000000..7f03b67 --- /dev/null +++ b/bin/mutt_bgrun @@ -0,0 +1,114 @@ +#!/bin/sh +# @(#) mutt_bgrun $Revision: 1.4 $ + +# mutt_bgrun - run an attachment viewer from mutt in the background +# Copyright (C) 1999-2002 Gary A. Johnson +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# SYNOPSIS +# mutt_bgrun viewer [viewer options] file +# +# DESCRIPTION +# Mutt invokes external attachment viewers by writing the +# attachment to a temporary file, executing the pipeline specified +# for that attachment type in the mailcap file, waiting for the +# pipeline to terminate, writing nulls over the temporary file, +# then deleting it. This causes problems when using graphical +# viewers such as qvpview and acroread to view attachments. +# +# If qvpview, for example, is executed in the foreground, the mutt +# user interface is hung until qvpview exits, so the user can't do +# anything else with mutt until he or she finishes reading the +# attachment and exits qvpview. This is especially annoying when +# a message contains several MS Office attachments--one would like +# to have them all open at once. +# +# If qvpview is executed in the background, it must be given +# enough time to completely read the file before returning control +# to mutt, since mutt will then obliterate the file. Qvpview is +# so slow that this time can exceed 20 seconds, and the bound is +# unknown. So this is again annoying. +# +# The solution provided here is to invoke the specified viewer +# from this script after first copying mutt's temporary file to +# another temporary file. This script can then quickly return +# control to mutt while the viewer can take as much time as it +# needs to read and render the attachment. +# +# EXAMPLE +# To use qvpview to view MS Office attachments from mutt, add the +# following lines to mutt's mailcap file. +# +# application/msword; mutt_bgrun qvpview %s +# application/vnd.ms-excel; mutt_bgrun qvpview %s +# application/vnd.ms-powerpoint; mutt_bgrun qvpview %s +# +# AUTHOR +# Gary A. Johnson +# <garyjohn@spk.agilent.com> +# +# ACKNOWLEDGEMENTS +# My thanks to the people who have commented on this script and +# offered solutions to shortcomings and bugs, especially Edmund +# GRIMLEY EVANS <edmundo@rano.org> and Andreas Somogyi +# <aso@somogyi.nu>. + +prog=${0##*/} + +# Check the arguments first. + +if [ "$#" -lt "2" ] +then + echo "usage: $prog viewer [viewer options] file" >&2 + exit 1 +fi + +# Separate the arguments. Assume the first is the viewer, the last is +# the file, and all in between are options to the viewer. + +viewer="$1" +shift + +while [ "$#" -gt "1" ] +do + options="$options $1" + shift +done + +file=$1 + +# Create a temporary directory for our copy of the temporary file. +# +# This is more secure than creating a temporary file in an existing +# directory. + +tmpdir=/tmp/$LOGNAME$$ +umask 077 +mkdir "$tmpdir" || exit 1 +tmpfile="$tmpdir/${file##*/}" + +# Copy mutt's temporary file to our temporary directory so that we can +# let mutt overwrite and delete it when we exit. + +cp "$file" "$tmpfile" + +# Run the viewer in the background and delete the temporary files when done. + +( + "$viewer" $options "$tmpfile" + rm -f "$tmpfile" + rmdir "$tmpdir" +) & diff --git a/bin/mutt_version b/bin/mutt_version new file mode 100755 index 0000000..96a8a08 --- /dev/null +++ b/bin/mutt_version @@ -0,0 +1,5 @@ +#!/bin/sh +mutt="`neomutt -v | head -1`" +os="`uname -o -r`" + +echo "my_hdr \"User-Agent: $mutt - $os\"" diff --git a/bin/print_unicode.sh b/bin/print_unicode.sh new file mode 100755 index 0000000..24815a0 --- /dev/null +++ b/bin/print_unicode.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +## print_unicode.sh +## By Amanda Hickman https://gist.github.com/amandabee/cf7faad0a6f2afc485ee +## Using https://github.com/baruchel/txt2pdf to print emails to PDF with unicode support. + +pdir="$HOME/.neomutt/tmp" +open_pdf=qpdfview +scriptloc="python3 $HOME/.neomutt/bin/text2pdf.py" + +# check to make sure that we're looking for txt2pdf in the right place +if ! command -v python3 $scriptloc >/dev/null; then + echo "Is $scriptloc installed?" + exit 1 +fi + +# create temp dir if it does not exist +if [ ! -d "$pdir" ]; then + mkdir -p "$pdir" 2>/dev/null + if [ $? -ne 0 ]; then + echo "Unable to make directory '$pdir'" 1>&2 + exit 2 + fi +fi + +# dump stdin to a tempfile +tmptxt="`mktemp $pdir/mutt_XXXXXXX.txt`" +cat >> $tmptxt + +tmpfile="`mktemp $pdir/mutt_XXXXXXXX.pdf`" + +# Actually write the text into a PDF. +$scriptloc --quiet -o $tmpfile $tmptxt +$open_pdf $tmpfile >/dev/null 2>&1 & +sleep 1 +rm $tmpfile +rm $tmptxt @@ -0,0 +1,11 @@ +# +text/html; librewolf %s; +text/html; cha -T text/html %s;copiousoutput; +# +audio/*; cp %s ~/neomutt/tmp \; vlc ~/neomutt/tmp/$(basename %s) > /dev/null 2>&1 & +image/*; cp %s ~/neomutt/tmp \; ristretto ~/neomutt/tmp/$(basename %s) > /dev/null 2>&1 & +# +application/ics; /usr/bin/calcurse -i %s && notify-send "Entry added to calendar 📅" +text/calendar; /usr/bin/calcurse -i %s && notify-send "Entry added to calendar 📅" +text/x-vcard; ~/neomutt/bin/mutt.vcard.filter; copiousoutput; +application/*; cp %s ~/neomutt/tmp \; xdg-open ~/neomutt/tmp/$(basename %s) > /dev/null 2>&1 & diff --git a/mutt-128.png b/mutt-128.png Binary files differnew file mode 100644 index 0000000..62860e3 --- /dev/null +++ b/mutt-128.png diff --git a/mutt.svg b/mutt.svg new file mode 100644 index 0000000..cf9952c --- /dev/null +++ b/mutt.svg @@ -0,0 +1,255 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="128" + height="128" + id="svg2" + sodipodi:version="0.32" + inkscape:version="0.92+devel unknown" + version="1.0" + sodipodi:docname="mutt3.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape"> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="6.4296875" + inkscape:cx="46.425273" + inkscape:cy="64" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1920" + inkscape:window-height="1043" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:document-rotation="0" + inkscape:window-maximized="1" + showguides="true" + inkscape:guide-bbox="true" /> + <defs + id="defs4"> + <linearGradient + id="linearGradient3345"> + <stop + id="stop3347" + offset="0" + style="stop-color:#ff0000;stop-opacity:1;" /> + <stop + id="stop3349" + offset="1" + style="stop-color:#940000;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient3257"> + <stop + id="stop3259" + offset="0" + style="stop-color:#cecece;stop-opacity:1;" /> + <stop + id="stop3261" + offset="1" + style="stop-color:#868686;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient3235"> + <stop + id="stop3237" + offset="0" + style="stop-color:#ff00ff;stop-opacity:1;" /> + <stop + id="stop3239" + offset="1" + style="stop-color:#ffffff;stop-opacity:1;" /> + </linearGradient> + <linearGradient + gradientUnits="userSpaceOnUse" + y2="394.38568" + x2="539.43414" + y1="443.66733" + x1="571.40063" + id="linearGradient3241" + xlink:href="#linearGradient3235" + inkscape:collect="always" + gradientTransform="matrix(0.20795291,0,0,0.20795291,-13.774674,-30.167293)" /> + <radialGradient + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.20795291,0,0,0.28016418,-16.267495,-58.832572)" + r="131.9026" + fy="366.79135" + fx="467.95715" + cy="366.79135" + cx="467.95715" + id="radialGradient3281" + xlink:href="#linearGradient3257" + inkscape:collect="always" /> + <radialGradient + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-0.12467656,0.28978887,-0.22213472,-0.09556964,216.94631,47.541979)" + r="164.39754" + fy="613.58545" + fx="290.80487" + cy="613.58545" + cx="290.80487" + id="radialGradient3289" + xlink:href="#linearGradient3257" + inkscape:collect="always" /> + <linearGradient + gradientTransform="matrix(2.5198791,0,0,2.5198791,2.0933907,8.2489441)" + spreadMethod="pad" + gradientUnits="userSpaceOnUse" + y2="25.270435" + x2="31.472214" + y1="25.270435" + x1="19.136297" + id="linearGradient3351" + xlink:href="#linearGradient3345" + inkscape:collect="always" /> + </defs> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <cc:license + rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" /> + <dc:title></dc:title> + <dc:date>18 March 2009</dc:date> + <dc:creator> + <cc:Agent> + <dc:title>Malcolm Locke <malc@wholemeal.co.nz></dc:title> + </cc:Agent> + </dc:creator> + <dc:description>Based on the XPM format icon provided with the Mutt Debian package</dc:description> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/licenses/by-sa/4.0/"> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Reproduction" /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Distribution" /> + <cc:requires + rdf:resource="http://creativecommons.org/ns#Notice" /> + <cc:requires + rdf:resource="http://creativecommons.org/ns#Attribution" /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> + <cc:requires + rdf:resource="http://creativecommons.org/ns#ShareAlike" /> + </cc:License> + </rdf:RDF> + </metadata> + <g + transform="matrix(1.066667,0,0,1.066667,0,-8.5333409)" + id="layer1" + inkscape:groupmode="layer" + inkscape:label="Layer 1"> + <path + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccccccc" + id="path3247" + d="M 53.893906,57.746894 C 51.029821,68.379939 71.216708,80.473936 78.681482,83.374707 84.425333,83.241211 95.106113,84.308884 99.687898,75.392266 104.77109,65.263242 103.96513,55.975502 93.385957,48.083939 91.339778,37.951958 100.0217,33.950317 105.14955,27.91778 98.707597,24.335087 92.265626,28.312326 85.823654,35.900217 81.199141,29.921338 82.607305,22.132633 89.184689,12.793174 67.295131,15.680263 71.367893,26.203347 66.917898,34.219717 62.576559,39.898296 58.235238,45.513485 53.893906,57.746894 Z" + style="fill:url(#radialGradient3281);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.32724547;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <path + inkscape:connector-curvature="0" + style="fill:#4d4d4d;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.11929297;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 28.326272,95.122935 C 19.563975,104.01227 15.10636,113.29294 22.509698,123.65188 h 24.374231 c 7.881542,-16.77052 -3.614305,-17.84675 -14.125976,-13.29504 4.986954,-4.41269 8.670015,-9.34694 9.971268,-15.233905" + id="path3313" + sodipodi:nodetypes="ccccc" /> + <path + inkscape:connector-curvature="0" + style="fill:#000000;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:3.11929297;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 62.671785,98.169725 c 0.06175,8.278825 -0.4409,15.993255 0.276973,24.928195 L 89.53884,122.82093 C 93.1936,105.5025 88.643572,101.13937 74.581926,108.14099 L 70.981185,93.184074" + id="path3319" + sodipodi:nodetypes="ccccc" /> + <path + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccccccc" + id="path3245" + d="M 53.893906,57.746894 C 47.292794,66.098444 40.188575,69.418798 32.467376,66.56958 23.254128,53.82569 18.805418,41.081802 27.425838,28.337915 16.435448,34.85576 9.0408977,43.48882 16.922635,61.107911 l 2.520768,6.722055 C 14.889236,78.1183 9.6034327,88.458898 20.28366,97.659062 c 22.163369,18.073518 57.337616,-4.9279 53.384704,-7.98242 l 5.013118,-6.301935" + style="fill:url(#radialGradient3289);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.32624054;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <ellipse + ry="8.8633604" + rx="9.1403408" + cy="57.662941" + cx="102.27995" + id="path3225" + style="opacity:1;fill:url(#linearGradient3241);fill-opacity:1;stroke:#000000;stroke-width:2.06630111;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <ellipse + ry="2.63131" + rx="0.83094001" + cy="47.553169" + cx="85.384171" + id="path3291" + style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:3.32724667;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <ellipse + ry="2.63131" + rx="0.83094001" + cy="47.276199" + cx="92.031685" + style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:3.32724667;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path3293" /> + <path + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccc" + id="path3295" + d="m 81.506412,19.716663 c -3.486295,3.275665 -7.135985,6.224517 -7.755429,15.233911 1.95808,-1.677372 4.065495,-2.757329 7.478454,1.38489 -3.915093,-4.96711 -0.48975,-10.982864 0.276975,-16.618801 z" + style="fill:#4d4d4d;fill-opacity:0.75;fill-rule:evenodd;stroke:none;stroke-width:0.93556213px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + inkscape:connector-curvature="0" + style="fill:#4d4d4d;fill-opacity:0.75;fill-rule:evenodd;stroke:none;stroke-width:0.93556213px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 97.312758,31.413307 c -3.241676,1.192967 -6.462493,2.157066 -10.070052,7.365164 1.762249,-0.573754 3.398001,-0.761228 3.927831,2.427722 -0.530283,-3.785859 3.661026,-6.616363 6.142221,-9.792886 z" + id="path3297" + sodipodi:nodetypes="cccc" /> + <path + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" + id="path3299" + d="m 49.835874,59.601777 c 7.162215,9.140337 14.838626,19.665567 26.13094,28.805907 l 4.985651,-4.708656 C 68.953657,73.575088 61.371004,63.08934 53.345534,54.289872 Z" + style="fill:url(#linearGradient3351);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.89419734;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <path + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" + id="path3301" + d="M 20.293857,95.886144 C 11.531558,104.77547 6.2430031,115.16407 13.646338,125.523 h 24.374227 c 10.097757,-19.72546 -2.161818,-19.78339 -14.125967,-13.29504 4.068063,-3.93312 9.953891,-6.7531 10.581431,-14.459147" + style="fill:#a2a2a2;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.11929297;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <path + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" + id="path3317" + d="m 52.896361,100.82425 c 0.06175,8.27882 -0.636753,15.20985 0.08111,24.1448 l 26.590086,-0.277 C 84.233348,108.70924 81.703039,100.3728 64.610643,110.01211 L 63.421595,96.812121" + style="fill:#a0a0a0;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.11929297;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <ellipse + ry="0.072326802" + rx="0.051662002" + cy="45.596138" + cx="84.761467" + id="path3355" + style="opacity:1;fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:2.62325907;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <ellipse + ry="0.072326802" + rx="0.051662002" + cy="45.596138" + cx="91.163231" + style="opacity:1;fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:2.62325907;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path3357" /> + </g> +</svg> diff --git a/neomuttrc b/neomuttrc new file mode 100644 index 0000000..9729019 --- /dev/null +++ b/neomuttrc @@ -0,0 +1,171 @@ +# .neomuttrc + +set config_charset = "utf-8" +set send_charset = "utf-8" +set charset = "utf-8" +set assumed_charset = "utf-8" +set attach_charset = "utf-8" +set rfc2047_parameters = yes + +set header_cache = ~/neomutt/cache/headers +set certificate_file = ~/neomutt/certificates +set message_cachedir = ~/neomutt/cache/bodies +set alias_file = ~/neomutt/aliases +set mailcap_path = ~/neomutt/mailcap +set tmpdir = /tmp + +# mail settings +set mail_check = 30 +set timeout = 600 # time to wait until abort waiting for input. +set mail_check_stats # periodically calculate message statistics +set xterm_set_titles = yes +set sleep_time = 0 # Don't pause + +# mailcap +auto_view text/html text/plain + +# Sidebar +set sidebar_visible = yes +set sidebar_short_path # Shorten mailbox names +set sidebar_delim_chars = "/." # Delete everything up to the last / character +set sidebar_folder_indent = yes # Indent folders whose names we've shortened +set sidebar_indent_string = "▸" +set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S" +set sidebar_width = 30 +set sidebar_sort_method = "unsorted" +set sidebar_divider_char ="│" + +# Folder hooks +folder-hook . `rm -f /neomutt/tmp/*` # empty tmp folder +folder-hook "~/.mail/philip/*" "source ~/neomutt/accounts/philip.rc" + +# Printing +set print = ask-no +set print_command = "~/neomutt/bin/print_unicode.sh" + +# index display +set sort = threads +set sort_aux = last-date-received +set delete = yes # just delete don't ask + +# pager display +set pager = "builtin" +set smart_wrap = yes # lines wrapped at word boundary at screen edge. +set markers = no # don't add "+" at wrapped lines +set pager_stop = yes # don't continue to next message +set display_filter = "~/neomutt/bin/display_filter.sh" + +# message display +ignore * +unhdr_order * +unignore Date: From: To: Cc: Bcc: X-Mailer: User-Agent: X-Spam-Flag: Subject: +hdr_order Date: From: To: Cc: Bcc: X-Mailer: User-Agent: X-Spam-Flag: Subject: +set quote_regex = "^([ \t]*[|>:}#])+" +set smileys = "(>From )|(:[-^]?[][)(><}{|/DP])" # catch some common false positives of $quote_regex +set pipe_decode = "yes" # weed headers and attempt to decode the messages first. + +# attachments +attachments +A */.* # Give all MIME parts an "attachment" disposition +set attach_save_dir = "~/Documents" +set attach_save_without_prompting +set abort_noattach = ask-yes +# French & English regex +set abort_noattach_regex = "\\<(attach|attached|attaché|attachés|attache|attachons|joint|jointe|joints|jointes|joins|joignons)\\>" + +# editor +set text_flowed = yes # don't cut lines +#set editor = "~/.neomutt/bin/mutt-trim %s; joe -nobackups %s" +set editor = "~/neomutt/bin/mutt-trim %s; micro %s" + +# Replies +set attribution = "* %n <%a> [%(%y%m%d %H:%M)]:" +set fast_reply # do not ask for to, subject,... when replying. +set include = yes # include message + +# Forwards +set forward_format = "[Tr: %s]" +set forward_quote + +# Abook +set query_command = "abook --mutt-query '%s'" +macro index,pager a "<pipe-message>abook --add-email-quiet<return>" "Add this sender to Abook" +macro generic,index,pager \ca "<shell-escape>abook<return>" "launch abook" + +# Header Compression +set header_cache_compress_method = "zlib" +set header_cache_compress_level = 1 + +# PGP commands +set pgp_decode_command = "gpg2 %?p?--passphrase- 0? --no-verbose --batch --output - %f" +set pgp_verify_command = "gpg2 --no-verbose --batch --output - --verify %s %f" +set pgp_decrypt_command = "gpg2 --passphrase- 0 --no-verbose --batch --output - %f" +set pgp_sign_command = "gpg2 --no-verbose --batch --output - --passphrase- 0 --armor --detach-sign --textmode %?a?-u %a? %f" +set pgp_clearsign_command = "gpg2 --no-verbose --batch --output - --passphrase- 0 --armor --textmode --clearsign %?a?-u %a? %f" +set pgp_encrypt_only_command = "/usr/lib/neomutt/pgpewrap gpg2 --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to $pgp_sign_as -- -r %r -- %f" +set pgp_encrypt_sign_command = "/usr/lib/neomutt/pgpewrap gpg2 --passphrase- 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to $pgp_sign_as -- -r %r -- %f" +set pgp_import_command = "gpg2 --no-verbose --import %f" +set pgp_export_command = "gpg2 --no-verbose --export --armor %r" +set pgp_verify_key_command = "gpg2 --no-verbose --batch --fingerprint --check-sigs %r" +set pgp_list_pubring_command = "gpg2 --no-verbose --batch --with-colons --list-keys %r" +set pgp_list_secring_command = "gpg2 --no-verbose --batch --with-colons --list-secret-keys %r" + + +# other settings + +#unset quit + +# Spam flag +# spam "X-Spam-Flag: YES" "" +# This pushes spam lines to right and it's ugly +# so instead I colour the line that contains X-Spam-Flag using +# color index color197 color233 ~hX-Spam-Flag +# in the colour theme + +# add my_hdr $mutt_version - $os_version +my_hdr User-Agent: `neomutt -v | head -1` - `uname -r` Linux + +# file browser +set sort_browser=reverse-date + +#### Key bindings +# sidebar +bind index,pager <C-up> sidebar-prev # Previous Mailbox +bind index,pager <C-down> sidebar-next # Next Mailbox +bind index,pager * sidebar-open # Open Highlighted Mailbox +# +bind pager <down> next-line # pager down one line +bind pager <up> previous-line # pager up one line +bind editor <Tab> complete-query # Abook completion + +#### Macros +# account swap +unset wait_key #don't wait for user input +macro index,pager <F2> "<sync-mailbox><enter-command>source ~/neomutt/accounts/philip.rc<enter><change-folder>!<enter><redraw-screen>" +# toggle sidebar +macro index,pager <F5> "<enter-command>toggle sidebar_visible <enter><redraw-screen>" +# F6 in index runs mbsync, see philip.rc +macro pager <F6> "<pipe-message>~/neomutt/bin/translate.sh<enter>" +# urlscan +macro index,pager \cb "<pipe-message>urlscan -c -d<Enter>" "call urlscan to extract URLs out of a message" +macro attach,compose \cb "<pipe-entry>urlscan -c -d<Enter>" "call urlscan to extract URLs out of a message" +# reload config +macro index,browser,pager \cr "<enter-command>source ~/neomutt/.neomuttrc<enter>" +# View in graphic browser +macro attach 'V' "<pipe-entry>iconv -c --to-code=UTF8 > ~/neomutt/tmp/mail.html<enter><shell-escape>floorp ~/.neomutt/tmp/mail.html<enter>" + +# SPAM +# Mark as not spam and move mail to inbox +macro index,pager n "<tag-prefix><pipe-entry>bogofilter -Mn<enter>\ +<tag-prefix><save-message>=Inbox<enter><enter><sync-mailbox>" "Mark as non spam & move to Inbox" +# Mark as not spam and do nothing else +macro index . "<tag-prefix><pipe-entry>bogofilter -Mn<enter>" "Mark as not spam in index" +macro pager . "<pipe-entry>bogofilter -Mn<enter>" "Mark as not spam in pager" +# Mark as spam and delete +macro index x "<tag-prefix><pipe-entry>bogofilter -MNs<enter><tag-prefix><save-message>=Junk<enter><enter><sync-mailbox>" +macro pager x "<pipe-entry>bogofilter -MNs<enter><save-message>=Junk<enter><enter><sync-mailbox>" + + +#### more config files +source ~/neomutt/accounts/philip.rc # default account +source ~/neomutt/themes/venelles.rc # my color theme + diff --git a/themes/venelles.rc b/themes/venelles.rc new file mode 100644 index 0000000..855cb8d --- /dev/null +++ b/themes/venelles.rc @@ -0,0 +1,78 @@ +# venelles.rc + +# general +color error color231 color212 +#color indicator color0 color228 +color indicator color0 color10 +color markers color210 color233 +color message color254 color233 +color normal color254 color233 +color prompt color254 color233 +color search color84 color233 +color status color249 color236 +color tilde color231 color233 +color tree color94 color233 +color quoted color71 color233 # all quoted lines +color signature color212 color233 +color progress white red + +# message index +color index color159 color233 ~A # all messages +color index color35 color233 ~P # from me +color index color46 color233 ~N # new message line +color index_flags color22 color233 ~Q # replied to line +color index color178 color233 ~F # flagged message line +color index_flags color196 color233 ~F # flag colour +color index color160 color233 ~D # deleted message line +color index color215 color233 ~T # tagged message line +color index color197 color233 ~hX-Spam-Flag #spam + +# sidebar +color sidebar_divider color192 color233 # The dividing line between the Sidebar and the Index/Pager panels +color sidebar_flagged color174 color233 # Mailboxes containing flagged mail +color sidebar_highlight color233 color101 # Cursor to select a mailbox +color sidebar_indicator color0 color10 # The mailbox open in the Index panel +color sidebar_new color46 color233 # Mailboxes containing new mail +color sidebar_ordinary color192 color233 # Mailboxes that have no new/flagged mails, etc. +color sidebar_spool_file color192 color233 # Mailbox that receives incoming mail +color sidebar_unread color192 color233 # Mailboxes containing unread mail + + +# message headers +color hdrdefault color233 color30 +color header color231 color30 ^Subject:.* +color header white red ^X-Spam-Flag:.* + +# message body +color attachment color222 color233 +color body color9 color233 [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+ # email addresses + +color body color231 color233 (^|[[:space:]])\\*[^[:space:]]+\\*([[:space:]]|$) # *bold* text +color body color231 color233 (^|[[:space:]])_[^[:space:]]+_([[:space:]]|$) # _underlined_ text +color body color231 color233 (^|[[:space:]])/[^[:space:]]+/([[:space:]]|$) # /italic/ text +color body color124 color233 Sent.from.* +color body color233 color155 "[;:]-*[)>(<|]" +color body color196 color233 "[*] .*:$" # Attribution (gukes) +color body color196 color233 "Le .* a écrit :$" # Attribution (French) +color body color196 color233 "On .* wrote:$" +color body color39 color233 "\\[[0-9]+\\]" +color body color143 color233 "^#v[-+]" +color body color39 color233 (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+ # URLs +color body color235 color233 "\\[.*\\]" +color body color39 color233 "\\[-- .* --\\]" + +# The older the email, the darker it appears. +color index color250 default "~d >7d" # older than 7 days +color index color248 default "~d >20d" # older than 20 days +color index color246 default "~d >30d" # older than 30 days +color index color244 default "~d >90d" # older than 90 days + +# PGP111 +color body color215 color233 "^Bonne signature de : .*" +color body color215 color233 "créée : .*" +color body color215 color233 "aka : .*" +color body color215 color233 "^ATTENTION ! Nous n'avons AUCUNE indication .*" +color body color215 color233 "^Empreinte : .*" +color body color196 color233 "^Signature problématique de : .*" + + |