diff options
author | Matthew Lemon <lemon@x220.lan> | 2020-09-06 16:48:05 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@x220.lan> | 2020-09-06 16:48:05 +0100 |
commit | e4640e28c8449eea66392052bfab57ce0cdd27f9 (patch) | |
tree | 2be81b55bc37da60599f4e6d434e74a57694962e /mutt |
first commit
Diffstat (limited to '')
-rw-r--r-- | mutt/aliases | 8 | ||||
-rw-r--r-- | mutt/colours | 94 | ||||
-rw-r--r-- | mutt/colours-bak | 69 | ||||
-rw-r--r-- | mutt/mailcap | 23 | ||||
-rw-r--r-- | mutt/mutt-colors-solarized-dark-256.muttrc | 151 | ||||
-rw-r--r-- | mutt/mutt-colors-solarized-light-16.muttrc | 151 | ||||
-rw-r--r-- | mutt/mutt-colors-solarized-light-256.muttrc | 151 | ||||
-rw-r--r-- | mutt/offlineimap.py | 5 | ||||
-rw-r--r-- | mutt/offlineimap.py-bak | 17 | ||||
-rw-r--r-- | mutt/signature | 3 | ||||
-rw-r--r-- | mutt/subscriptions | 3 | ||||
-rwxr-xr-x | mutt/view_attachment.sh | 129 | ||||
-rw-r--r-- | muttrc | 235 | ||||
-rw-r--r-- | muttrc-gmail | 155 |
14 files changed, 1194 insertions, 0 deletions
diff --git a/mutt/aliases b/mutt/aliases new file mode 100644 index 0000000..fab124a --- /dev/null +++ b/mutt/aliases @@ -0,0 +1,8 @@ +alias work Matthew Lemon (DfT) <matthew.lemon@dft.gov.uk> +alias joanna Joanna Lemon <joannalemon1@gmail.com> +alias maw Clare Lemon <clarelemon51@gmail.com> +alias tam Tim Lemon <tjlemon43@gmail.com> +alias henry Gavin Macfarlane <gavmacfarlane@gmail.com> +alias dan Daniel Barwick <danbarwick@gmail.com> +alias neil Neil Byrne <nbyrne@wandsworth.gov.uk> +alias Keiron Keiron Hart <keironh@googlemail.com> diff --git a/mutt/colours b/mutt/colours new file mode 100644 index 0000000..2f57890 --- /dev/null +++ b/mutt/colours @@ -0,0 +1,94 @@ +## Theme kindly inspired from +## http://nongeekshandbook.blogspot.ie/2009/03/mutt-color-configuration.html + + +## Colours for items in the index +#color index blue default ~N +color index brightblue default ~N +color index brightred black ~O +color index brightyellow black ~F +color index black green ~T +color index brightred black ~D +color index magenta default ~Q # replied-to +#color index black yellow ~U +color index red default ~T +mono index bold ~N +mono index bold ~F +mono index bold ~T +mono index bold ~D + +## Highlights inside the body of a message. + +## URLs +color body green black "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*" +color body green black "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" +color body green black "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*" +color body green black "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" +mono body bold "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*" +mono body bold "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" + +## Email addresses. +color body black green "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+" + +## Header +color header green black "^from:" +color header green black "^to:" +color header green black "^cc:" +color header green black "^date:" +color header yellow black "^newsgroups:" +color header yellow black "^reply-to:" +color header brightcyan black "^subject:" +color header red black "^x-spam-rule:" +color header green black "^x-mailer:" +color header yellow black "^message-id:" +color header yellow black "^Organization:" +color header yellow black "^Organisation:" +color header yellow black "^User-Agent:" +color header yellow black "^message-id: .*pine" +color header yellow black "^X-Fnord:" +color header yellow black "^X-WebTV-Stationery:" + +color header red black "^x-spam-rule:" +color header green black "^x-mailer:" +color header yellow black "^message-id:" +color header yellow black "^Organization:" +color header yellow black "^Organisation:" +color header yellow black "^User-Agent:" +color header yellow black "^message-id: .*pine" +color header yellow black "^X-Fnord:" +color header yellow black "^X-WebTV-Stationery:" +color header yellow black "^X-Message-Flag:" +color header yellow black "^X-Spam-Status:" +color header yellow black "^X-SpamProbe:" +color header red black "^X-SpamProbe: SPAM" + +## Coloring quoted text - coloring the first 7 levels: +color quoted cyan black +color quoted1 yellow black +color quoted2 red black +color quoted3 green black +color quoted4 cyan black +color quoted5 yellow black +color quoted6 red black +color quoted7 green black + +## Default color definitions +#color hdrdefault white green +color normal white default +color signature brightmagenta black +color indicator black cyan +color attachment green black +color error red black +color message white black +color search brightwhite magenta +color status brightyellow blue +color tree brightblue black +#color tilde green black +color bold brightyellow black +#color underline magenta black +color markers brightcyan black + +## Colour definitions when on a mono screen +mono bold bold +mono underline underline +mono indicator reverse diff --git a/mutt/colours-bak b/mutt/colours-bak new file mode 100644 index 0000000..8c80ebf --- /dev/null +++ b/mutt/colours-bak @@ -0,0 +1,69 @@ +# -*- muttrc -*- +# +# Colour settings for mutt. +# +# $Id: colours 6 2007-03-02 17:36:39Z vdanen $ + +# Default colour definitions +color normal white default +color quoted yellow default +color quoted1 green default +color quoted2 white default +color quoted3 yellow default +color quoted4 green default +color quoted5 white default + +color indicator black cyan +color message yellow black +color status yellow blue +color error yellow red +color attachment magenta default +color signature red default +color markers red yellow +color tilde yellow black +color search white red +color tree green default +color bold brightyellow default + +color hdrdefault cyan default +color header green default '^From:' +color header red default '^Subject:' +color header yellow default '^(To|CC):.*vdanen' + +# Colours for items in the index +color index cyan default ~N +color index green default "~N (~x annvix\.org | ~h \"^In-[Rr]eply-[Tt]o: .*annvix\.org\")" +color index green default "~N (~x linsec\.ca | ~h \"^In-[Rr]eply-[Tt]o: .*linsec\.ca\")" +color index green default "~N (~x mandriva\.com | ~h \"^In-[Rr]eply-[Tt]o: .*mandriva\.com\")" +color index red default ~F +color index green default ~T +color index brightwhite default ~D +mono index bold ~N +mono index bold ~F +mono index bold ~T +mono index bold ~D + +# Highlights inside the body of a message. + +# URLs +color body brightgreen default "(http|https|ftp|news|telnet|finger)://[^ \">\t\r\n]*" +color body brightgreen default "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" +color body brightgreen default "news:[^ \">\t\r\n]*" +mono body bold "(http|https|ftp|news|telnet|finger)://[^ \">\t\r\n]*" +mono body bold "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" +mono body bold "news:[^ \">\t\r\n]*" + +# email addresses +color body brightcyan default "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+" +mono body bold "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+" + +# Various smilies and the like +color body yellow default "(^|[[:space:]])\\*[^[:space:]]+\\*([[:space:]]|$)" # *Bold* text. +color body yellow default "(^|[[:space:]])_[^[:space:]]+_([[:space:]]|$)" # _Underlined_ text. +color body yellow default "(^|[[:space:]])/[^[:space:]]+/([[:space:]]|$)" # /Italic/ text. + +# Colour definitions when on a mono screen +mono bold bold +mono underline underline +mono indicator reverse +mono header bold "^(From|Subject|X-Junked-Because|X-Virus-hagbard):" diff --git a/mutt/mailcap b/mutt/mailcap new file mode 100644 index 0000000..9a568c0 --- /dev/null +++ b/mutt/mailcap @@ -0,0 +1,23 @@ +# MS Word documents +# DONT HAVE A SOLUTION YET: application/msword; ~/.mutt/view_attachment.sh %s "-" '/Applications/TextEdit.app' + +# Images +image/jpg; ~/.mutt/view_attachment.sh %s jpg ristretto +image/jpeg; ~/.mutt/view_attachment.sh %s jpg ristretto +image/pjpeg; ~/.mutt/view_attachment.sh %s jpg gpicview +image/png; ~/.mutt/view_attachment.sh %s png gpicview +image/gif; ~/.mutt/view_attachment.sh %s gif gpicview + +# PDFs +application/pdf; ~/.mutt/view_attachment.sh %s pdf evince + +# HTML +#text/html; ~/.mutt/view_attachment.sh %s html w3m # try different +text/html; w3m %s; nametemplate=%s.html +text/html; w3m -dump %s; nametemplate=%s.html; copiousoutput + +# Plain Text +text/plain; cat; copiousoutput; edit=$VISUAL %s + +# Unidentified files +application/octet-stream; ~/.mutt/view_attachment.sh %s "-" diff --git a/mutt/mutt-colors-solarized-dark-256.muttrc b/mutt/mutt-colors-solarized-dark-256.muttrc new file mode 100644 index 0000000..b318651 --- /dev/null +++ b/mutt/mutt-colors-solarized-dark-256.muttrc @@ -0,0 +1,151 @@ +# vim: filetype=muttrc + +# +# +# make sure that you are using mutt linked against slang, not ncurses, or +# suffer the consequences of weird color issues. use "mutt -v" to check this. + +# custom body highlights ----------------------------------------------- +# highlight my name and other personally relevant strings +#color body color136 color234 "(ethan|schoonover)" +# custom index highlights ---------------------------------------------- +# messages which mention my name in the body +#color index color136 color234 "~b \"phil(_g|\!| gregory| gold)|pgregory\" !~N !~T !~F !~p !~P" +#color index J_cream color230 "~b \"phil(_g|\!| gregory| gold)|pgregory\" ~N !~T !~F !~p !~P" +#color index color136 color37 "~b \"phil(_g|\!| gregory| gold)|pgregory\" ~T !~F !~p !~P" +#color index color136 J_magent "~b \"phil(_g|\!| gregory| gold)|pgregory\" ~F !~p !~P" +## messages which are in reference to my mails +#color index J_magent color234 "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" !~N !~T !~F !~p !~P" +#color index J_magent color230 "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" ~N !~T !~F !~p !~P" +#color index J_magent color37 "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" ~T !~F !~p !~P" +#color index J_magent color160 "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" ~F !~p !~P" + +# for background in 16 color terminal, valid background colors include: +# base03, bg, black, any of the non brights + +# basic colors --------------------------------------------------------- +color normal color241 color234 +color error color160 color234 +color tilde color235 color234 +color message color37 color234 +color markers color160 color254 +color attachment color254 color234 +color search color61 color234 +#color status J_black J_status +color status color241 color235 +color indicator color234 color136 +color tree color136 color234 # arrow in threads + +# basic monocolor screen +mono bold bold +mono underline underline +mono indicator reverse +mono error bold + +# index ---------------------------------------------------------------- + +#color index color160 color234 "~D(!~p|~p)" # deleted +#color index color235 color234 ~F # flagged +#color index color166 color234 ~= # duplicate messages +#color index color240 color234 "~A!~N!~T!~p!~Q!~F!~D!~P" # the rest +#color index J_base color234 "~A~N!~T!~p!~Q!~F!~D" # the rest, new +color index color160 color234 "~A" # all messages +color index color166 color234 "~E" # expired messages +color index color33 color234 "~N" # new messages +color index color33 color234 "~O" # old messages +color index color61 color234 "~Q" # messages that have been replied to +color index color240 color234 "~R" # read messages +color index color33 color234 "~U" # unread messages +color index color33 color234 "~U~$" # unread, unreferenced messages +color index color241 color234 "~v" # messages part of a collapsed thread +color index color241 color234 "~P" # messages from me +color index color37 color234 "~p!~F" # messages to me +color index color37 color234 "~N~p!~F" # new messages to me +color index color37 color234 "~U~p!~F" # unread messages to me +color index color240 color234 "~R~p!~F" # messages to me +color index color160 color234 "~F" # flagged messages +color index color160 color234 "~F~p" # flagged messages to me +color index color160 color234 "~N~F" # new flagged messages +color index color160 color234 "~N~F~p" # new flagged messages to me +color index color160 color234 "~U~F~p" # new flagged messages to me +color index color235 color160 "~D" # deleted messages +color index color245 color234 "~v~(!~N)" # collapsed thread with no unread +color index color136 color234 "~v~(~N)" # collapsed thread with some unread +color index color64 color234 "~N~v~(~N)" # collapsed thread with unread parent +# statusbg used to indicated flagged when foreground color shows other status +# for collapsed thread +color index color160 color235 "~v~(~F)!~N" # collapsed thread with flagged, no unread +color index color136 color235 "~v~(~F~N)" # collapsed thread with some unread & flagged +color index color64 color235 "~N~v~(~F~N)" # collapsed thread with unread parent & flagged +color index color64 color235 "~N~v~(~F)" # collapsed thread with unread parent, no unread inside, but some flagged +color index color37 color235 "~v~(~p)" # collapsed thread with unread parent, no unread inside, some to me directly +color index color136 color160 "~v~(~D)" # thread with deleted (doesn't differentiate between all or partial) +#color index color136 color234 "~(~N)" # messages in threads with some unread +#color index color64 color234 "~S" # superseded messages +#color index color160 color234 "~T" # tagged messages +#color index color166 color160 "~=" # duplicated messages + +# message headers ------------------------------------------------------ + +#color header color240 color234 "^" +color hdrdefault color240 color234 +color header color241 color234 "^(From)" +color header color33 color234 "^(Subject)" + +# body ----------------------------------------------------------------- + +color quoted color33 color234 +color quoted1 color37 color234 +color quoted2 color136 color234 +color quoted3 color160 color234 +color quoted4 color166 color234 + +color signature color240 color234 +color bold color235 color234 +color underline color235 color234 +color normal color244 color234 +# +color body color245 color234 "[;:][-o][)/(|]" # emoticons +color body color245 color234 "[;:][)(|]" # emoticons +color body color245 color234 "[*]?((N)?ACK|CU|LOL|SCNR|BRB|BTW|CWYL|\ + |FWIW|vbg|GD&R|HTH|HTHBE|IMHO|IMNSHO|\ + |IRL|RTFM|ROTFL|ROFL|YMMV)[*]?" +color body color245 color234 "[ ][*][^*]*[*][ ]?" # more emoticon? +color body color245 color234 "[ ]?[*][^*]*[*][ ]" # more emoticon? + +## pgp + +color body color160 color234 "(BAD signature)" +color body color37 color234 "(Good signature)" +color body color234 color234 "^gpg: Good signature .*" +color body color241 color234 "^gpg: " +color body color241 color160 "^gpg: BAD signature from.*" +mono body bold "^gpg: Good signature" +mono body bold "^gpg: BAD signature from.*" + +# yes, an insance URL regex +color body color160 color234 "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]" +# and a heavy handed email regex +#color body J_magent color234 "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])" + +# Various smilies and the like +#color body color230 color234 "<[Gg]>" # <g> +#color body color230 color234 "<[Bb][Gg]>" # <bg> +#color body color136 color234 " [;:]-*[})>{(<|]" # :-) etc... +# *bold* +#color body color33 color234 "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)" +#mono body bold "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)" +# _underline_ +#color body color33 color234 "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)" +#mono body underline "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)" +# /italic/ (Sometimes gets directory names) +#color body color33 color234 "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)" +#mono body underline "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)" + +# Border lines. +#color body color33 color234 "( *[-+=#*~_]){6,}" + +#folder-hook . "color status J_black J_status " +#folder-hook gmail/inbox "color status J_black color136 " +#folder-hook gmail/important "color status J_black color136 " + diff --git a/mutt/mutt-colors-solarized-light-16.muttrc b/mutt/mutt-colors-solarized-light-16.muttrc new file mode 100644 index 0000000..3c119fb --- /dev/null +++ b/mutt/mutt-colors-solarized-light-16.muttrc @@ -0,0 +1,151 @@ +# vim: filetype=muttrc + +# +# +# make sure that you are using mutt linked against slang, not ncurses, or +# suffer the consequences of weird color issues. use "mutt -v" to check this. + +# custom body highlights ----------------------------------------------- +# highlight my name and other personally relevant strings +#color body yellow default "(ethan|schoonover)" +# custom index highlights ---------------------------------------------- +# messages which mention my name in the body +#color index yellow default "~b \"phil(_g|\!| gregory| gold)|pgregory\" !~N !~T !~F !~p !~P" +#color index J_cream brightblack "~b \"phil(_g|\!| gregory| gold)|pgregory\" ~N !~T !~F !~p !~P" +#color index yellow cyan "~b \"phil(_g|\!| gregory| gold)|pgregory\" ~T !~F !~p !~P" +#color index yellow J_magent "~b \"phil(_g|\!| gregory| gold)|pgregory\" ~F !~p !~P" +## messages which are in reference to my mails +#color index J_magent default "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" !~N !~T !~F !~p !~P" +#color index J_magent brightblack "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" ~N !~T !~F !~p !~P" +#color index J_magent cyan "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" ~T !~F !~p !~P" +#color index J_magent red "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" ~F !~p !~P" + +# for background in 16 color terminal, valid background colors include: +# base03, bg, black, any of the non brights + +# basic colors --------------------------------------------------------- +color normal brightblue default +color error red default +color tilde white default +color message cyan default +color markers red black +color attachment black default +color search brightmagenta default +#color status J_black J_status +color status brightblue white +color indicator brightwhite yellow +color tree yellow default # arrow in threads + +# basic monocolor screen +mono bold bold +mono underline underline +mono indicator reverse +mono error bold + +# index ---------------------------------------------------------------- + +#color index red default "~D(!~p|~p)" # deleted +#color index white default ~F # flagged +#color index brightred default ~= # duplicate messages +#color index brightcyan default "~A!~N!~T!~p!~Q!~F!~D!~P" # the rest +#color index J_base default "~A~N!~T!~p!~Q!~F!~D" # the rest, new +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 brightcyan default "~R" # read messages +color index blue default "~U" # unread messages +color index blue default "~U~$" # unread, unreferenced messages +color index brightblue default "~v" # messages part of a collapsed thread +color index brightblue default "~P" # messages from me +color index cyan default "~p!~F" # messages to me +color index cyan default "~N~p!~F" # new messages to me +color index cyan default "~U~p!~F" # unread messages to me +color index brightcyan default "~R~p!~F" # messages to me +color index red default "~F" # flagged messages +color index red default "~F~p" # flagged messages to me +color index red default "~N~F" # new flagged messages +color index red default "~N~F~p" # new flagged messages to me +color index red default "~U~F~p" # new flagged messages to me +color index white red "~D" # deleted messages +color index brightgreen default "~v~(!~N)" # collapsed thread with no unread +color index yellow default "~v~(~N)" # collapsed thread with some unread +color index green default "~N~v~(~N)" # collapsed thread with unread parent +# statusbg used to indicated flagged when foreground color shows other status +# for collapsed thread +color index red white "~v~(~F)!~N" # collapsed thread with flagged, no unread +color index yellow white "~v~(~F~N)" # collapsed thread with some unread & flagged +color index green white "~N~v~(~F~N)" # collapsed thread with unread parent & flagged +color index green white "~N~v~(~F)" # collapsed thread with unread parent, no unread inside, but some flagged +color index cyan white "~v~(~p)" # collapsed thread with unread parent, no unread inside, some to me directly +color index yellow red "~v~(~D)" # thread with deleted (doesn't differentiate between all or partial) +#color index yellow default "~(~N)" # messages in threads with some unread +#color index green default "~S" # superseded messages +#color index red default "~T" # tagged messages +#color index brightred red "~=" # duplicated messages + +# message headers ------------------------------------------------------ + +#color header brightcyan default "^" +color hdrdefault brightcyan default +color header brightblue 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 brightcyan default +color bold white default +color underline white default +color normal default default +# +color body brightgreen default "[;:][-o][)/(|]" # emoticons +color body brightgreen default "[;:][)(|]" # emoticons +color body brightgreen default "[*]?((N)?ACK|CU|LOL|SCNR|BRB|BTW|CWYL|\ + |FWIW|vbg|GD&R|HTH|HTHBE|IMHO|IMNSHO|\ + |IRL|RTFM|ROTFL|ROFL|YMMV)[*]?" +color body brightgreen default "[ ][*][^*]*[*][ ]?" # more emoticon? +color body brightgreen default "[ ]?[*][^*]*[*][ ]" # more emoticon? + +## pgp + +color body red default "(BAD signature)" +color body cyan default "(Good signature)" +color body brightwhite default "^gpg: Good signature .*" +color body brightblue default "^gpg: " +color body brightblue red "^gpg: BAD signature from.*" +mono body bold "^gpg: Good signature" +mono body bold "^gpg: BAD signature from.*" + +# yes, an insance URL regex +color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]" +# and a heavy handed email regex +#color body J_magent default "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])" + +# Various smilies and the like +#color body brightblack default "<[Gg]>" # <g> +#color body brightblack default "<[Bb][Gg]>" # <bg> +#color body yellow default " [;:]-*[})>{(<|]" # :-) etc... +# *bold* +#color body blue default "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)" +#mono body bold "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)" +# _underline_ +#color body blue default "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)" +#mono body underline "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)" +# /italic/ (Sometimes gets directory names) +#color body blue default "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)" +#mono body underline "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)" + +# Border lines. +#color body blue default "( *[-+=#*~_]){6,}" + +#folder-hook . "color status J_black J_status " +#folder-hook gmail/inbox "color status J_black yellow " +#folder-hook gmail/important "color status J_black yellow " + diff --git a/mutt/mutt-colors-solarized-light-256.muttrc b/mutt/mutt-colors-solarized-light-256.muttrc new file mode 100644 index 0000000..4b3861d --- /dev/null +++ b/mutt/mutt-colors-solarized-light-256.muttrc @@ -0,0 +1,151 @@ +# vim: filetype=muttrc + +# +# +# make sure that you are using mutt linked against slang, not ncurses, or +# suffer the consequences of weird color issues. use "mutt -v" to check this. + +# custom body highlights ----------------------------------------------- +# highlight my name and other personally relevant strings +#color body color136 color233 "(ethan|schoonover)" +# custom index highlights ---------------------------------------------- +# messages which mention my name in the body +#color index color136 color233 "~b \"phil(_g|\!| gregory| gold)|pgregory\" !~N !~T !~F !~p !~P" +#color index J_cream color233 "~b \"phil(_g|\!| gregory| gold)|pgregory\" ~N !~T !~F !~p !~P" +#color index color136 color37 "~b \"phil(_g|\!| gregory| gold)|pgregory\" ~T !~F !~p !~P" +#color index color136 J_magent "~b \"phil(_g|\!| gregory| gold)|pgregory\" ~F !~p !~P" +## messages which are in reference to my mails +#color index J_magent color233 "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" !~N !~T !~F !~p !~P" +#color index J_magent color233 "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" ~N !~T !~F !~p !~P" +#color index J_magent color37 "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" ~T !~F !~p !~P" +#color index J_magent color160 "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" ~F !~p !~P" + +# for background in 16 color terminal, valid background colors include: +# base03, bg, black, any of the non brights + +# basic colors --------------------------------------------------------- +color normal color244 color233 +color error color160 color233 +color tilde color254 color233 +color message color37 color233 +color markers color160 color234 +color attachment color234 color233 +color search color61 color233 +#color status J_black J_status +color status color244 color254 +color indicator color230 color136 +color tree color136 color233 # arrow in threads + +# basic monocolor screen +mono bold bold +mono underline underline +mono indicator reverse +mono error bold + +# index ---------------------------------------------------------------- + +#color index color160 color233 "~D(!~p|~p)" # deleted +#color index color254 color233 ~F # flagged +#color index color166 color233 ~= # duplicate messages +#color index color245 color233 "~A!~N!~T!~p!~Q!~F!~D!~P" # the rest +#color index J_base color233 "~A~N!~T!~p!~Q!~F!~D" # the rest, new +color index color160 color233 "~A" # all messages +color index color166 color233 "~E" # expired messages +color index color33 color233 "~N" # new messages +color index color33 color233 "~O" # old messages +color index color61 color233 "~Q" # messages that have been replied to +color index color245 color233 "~R" # read messages +color index color33 color233 "~U" # unread messages +color index color33 color233 "~U~$" # unread, unreferenced messages +color index color244 color233 "~v" # messages part of a collapsed thread +color index color244 color233 "~P" # messages from me +color index color37 color233 "~p!~F" # messages to me +color index color37 color233 "~N~p!~F" # new messages to me +color index color37 color233 "~U~p!~F" # unread messages to me +color index color245 color233 "~R~p!~F" # messages to me +color index color160 color233 "~F" # flagged messages +color index color160 color233 "~F~p" # flagged messages to me +color index color160 color233 "~N~F" # new flagged messages +color index color160 color233 "~N~F~p" # new flagged messages to me +color index color160 color233 "~U~F~p" # new flagged messages to me +color index color254 color160 "~D" # deleted messages +color index color239 color233 "~v~(!~N)" # collapsed thread with no unread +color index color136 color233 "~v~(~N)" # collapsed thread with some unread +color index color64 color233 "~N~v~(~N)" # collapsed thread with unread parent +# statusbg used to indicated flagged when foreground color shows other status +# for collapsed thread +color index color160 color254 "~v~(~F)!~N" # collapsed thread with flagged, no unread +color index color136 color254 "~v~(~F~N)" # collapsed thread with some unread & flagged +color index color64 color254 "~N~v~(~F~N)" # collapsed thread with unread parent & flagged +color index color64 color254 "~N~v~(~F)" # collapsed thread with unread parent, no unread inside, but some flagged +color index color37 color254 "~v~(~p)" # collapsed thread with unread parent, no unread inside, some to me directly +color index color136 color160 "~v~(~D)" # thread with deleted (doesn't differentiate between all or partial) +#color index color136 color233 "~(~N)" # messages in threads with some unread +#color index color64 color233 "~S" # superseded messages +#color index color160 color233 "~T" # tagged messages +#color index color166 color160 "~=" # duplicated messages + +# message headers ------------------------------------------------------ + +#color header color245 color233 "^" +color hdrdefault color245 color233 +color header color244 color233 "^(From)" +color header color33 color233 "^(Subject)" + +# body ----------------------------------------------------------------- + +color quoted color33 color233 +color quoted1 color37 color233 +color quoted2 color136 color233 +color quoted3 color160 color233 +color quoted4 color166 color233 + +color signature color245 color233 +color bold color254 color233 +color underline color254 color233 +color normal color240 color233 +# +color body color239 color233 "[;:][-o][)/(|]" # emoticons +color body color239 color233 "[;:][)(|]" # emoticons +color body color239 color233 "[*]?((N)?ACK|CU|LOL|SCNR|BRB|BTW|CWYL|\ + |FWIW|vbg|GD&R|HTH|HTHBE|IMHO|IMNSHO|\ + |IRL|RTFM|ROTFL|ROFL|YMMV)[*]?" +color body color239 color233 "[ ][*][^*]*[*][ ]?" # more emoticon? +color body color239 color233 "[ ]?[*][^*]*[*][ ]" # more emoticon? + +## pgp + +color body color160 color233 "(BAD signature)" +color body color37 color233 "(Good signature)" +color body color230 color233 "^gpg: Good signature .*" +color body color244 color233 "^gpg: " +color body color244 color160 "^gpg: BAD signature from.*" +mono body bold "^gpg: Good signature" +mono body bold "^gpg: BAD signature from.*" + +# yes, an insance URL regex +color body color160 color233 "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]" +# and a heavy handed email regex +#color body J_magent color233 "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])" + +# Various smilies and the like +#color body color233 color233 "<[Gg]>" # <g> +#color body color233 color233 "<[Bb][Gg]>" # <bg> +#color body color136 color233 " [;:]-*[})>{(<|]" # :-) etc... +# *bold* +#color body color33 color233 "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)" +#mono body bold "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)" +# _underline_ +#color body color33 color233 "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)" +#mono body underline "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)" +# /italic/ (Sometimes gets directory names) +#color body color33 color233 "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)" +#mono body underline "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)" + +# Border lines. +#color body color33 color233 "( *[-+=#*~_]){6,}" + +#folder-hook . "color status J_black J_status " +#folder-hook gmail/inbox "color status J_black color136 " +#folder-hook gmail/important "color status J_black color136 " + diff --git a/mutt/offlineimap.py b/mutt/offlineimap.py new file mode 100644 index 0000000..3bdc780 --- /dev/null +++ b/mutt/offlineimap.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python2 +from subprocess import check_output + +def get_pass(account): + return check_output("pass Email/" + account, shell=True).rstrip() diff --git a/mutt/offlineimap.py-bak b/mutt/offlineimap.py-bak new file mode 100644 index 0000000..41fe18b --- /dev/null +++ b/mutt/offlineimap.py-bak @@ -0,0 +1,17 @@ +#/usr/bin/python + +import re, subprocess +def get_keychain_pass(account=None, server=None): + params = { + 'security': '/usr/bin/security', + 'command': 'find-internet-password', + 'account': account, + 'server': server, + 'keychain': '/Users/lemon/Library/Keychains/login.keychain', + } + command = "sudo -u lemon %(security)s -v %(command)s -g -a %(account)s -s %(server)s %(keychain)s" % params + output = subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT) + outtext = [l for l in output.splitlines() + if l.startswith('password: ')][0] + + return re.match(r'password: "(.*)"', outtext).group(1) diff --git a/mutt/signature b/mutt/signature new file mode 100644 index 0000000..c375431 --- /dev/null +++ b/mutt/signature @@ -0,0 +1,3 @@ + +Matthew Lemon +Email: matt@matthewlemon.com diff --git a/mutt/subscriptions b/mutt/subscriptions new file mode 100644 index 0000000..3b7eac4 --- /dev/null +++ b/mutt/subscriptions @@ -0,0 +1,3 @@ +subscribe debian-user@lists.debian.org +subscribe python-list +subscribe ubuntu-news@lists.ubuntu.com diff --git a/mutt/view_attachment.sh b/mutt/view_attachment.sh new file mode 100755 index 0000000..f391399 --- /dev/null +++ b/mutt/view_attachment.sh @@ -0,0 +1,129 @@ +#!/bin/bash +# +# Author: Eric Gebhart +# +# Purpose: To be called by mutt as indicated by .mailcap to handle mail attachments. +# +# Function: Copy the given file to a temporary directory so mutt +# Won't delete it before it is read by the application. +# +# Along the way, discern the file type or use the type +# That is given. +# +# Finally use 'open' or 'open -a' if the third argument is +# given. +# +# +# Arguments: +# +# $2 is the file +# $2 is the type - for those times when file magic isn't enough. +# I frequently get html mail that has no extension +# and file can't figure out what it is. +# +# Set to '-' if you don't want the type to be discerned. +# Many applications can sniff out the type on their own. +# And they do a better job of it too. +# +# Open Office and MS Office for example. +# +# $3 is open with. as in open -a 'open with this .app' foo.xls +# +# Examples: These are typical .mailcap entries which use this program. +# +# Image/JPEG; /Users/vdanen/.mutt/view_attachment %s +# Image/PNG; /Users/vdanen/.mutt/view_attachment %s +# Image/GIF; /Users/vdanen/.mutt/view_attachment %s +# +# Application/PDF; /Users/vdanen/.mutt/view_attachment %s +# +# #This HTML example passes the type because file doesn't always work and +# #there aren't always extensions. +# +# text/html; /Users/vdanen/.mutt/view_attachment %s html +# +# # If your Start OpenOffice.org.app is spelled with a space like this one, <-- +# # then you'll need to precede the space with a \ . I found that too painful +# # and renamed it with an _. +# +# Application/vnd.ms-excel; /Users/vdanen/.mutt/view_attachment %s "-" '/Applications/OpenOffice.org1.1.2/Start_OpenOffice.org.app' +# Application/msword; /Users/vdanen/.mutt/view_attachment %s "-" '/Applications/OpenOffice.org1.1.2/Start_OpenOffice.org.app' +# +# +# Debugging: If you have problems set debug to 'yes'. That will cause a debug file +# be written to /tmp/mutt_attach/debug so you can see what is going on. +# +# See Also: The man pages for open, file, basename +# + +# the tmp directory to use. +tmpdir="$HOME/.mutt/temp/mutt_attach" + +# the name of the debug file if debugging is turned on. +debug_file=$tmpdir/debug + +# debug. yes or no. +debug="no" +#debug="yes" + +type=$2 +open_with=$3 + +# make sure the tmpdir exists. +mkdir -p $tmpdir + +# clean it out. Remove this if you want the directory +# to accumulate attachment files. +rm -f $tmpdir/* + +# Mutt puts everything in /tmp by default. +# This gets the basic filename from the full pathname. +filename=`basename $1` + +# get rid of the extenson and save the name for later. +file=`echo $filename | cut -d"." -f1` + +if [ $debug = "yes" ]; then + echo "1:" $1 " 2:" $2 " 3:" $3 > $debug_file + echo "Filename:"$filename >> $debug_file + echo "File:"$file >> $debug_file + echo "===========================" >> $debug_file +fi + +# if the type is empty then try to figure it out. +if [ -z $type ]; then + type=`file -bi $1 | cut -d"/" -f2` +fi + +# if the type is '-' then we don't want to mess with type. +# Otherwise we are rebuilding the name. Either from the +# type that was passed in or from the type we discerned. +if [ $type = "-" ]; then + newfile=$filename +else + newfile=$file.$type +fi + +newfile=$tmpdir/$newfile + +# Copy the file to our new spot so mutt can't delete it +# before the app has a chance to view it. +cp $1 $newfile + +if [ $debug = "yes" ]; then + echo "File:" $file "TYPE:" $type >> $debug_file + echo "Newfile:" $newfile >> $debug_file + echo "Open With:" $open_with >> $debug_file +fi + +# If there's no 'open with' then we can let preview do it's thing. +# Otherwise we've been told what to use. So do an open -a. + +#vim $newfile + +#ML REMOVED THIS ON 18 September 2014 +if [ -z $open_with ]; then + echo "Dae ken how to open that razzer." +else + $open_with $newfile +fi @@ -0,0 +1,235 @@ +# Paths ---------------------------------------------- +# Getting all this from article by Steve Losh +# at http://stevelosh.com/blog/2012/10/the-homely-mutt/#contacts + +# source the mutt-solarized colorscheme +#source ~/dotfiles/.mutt/mutt-colors-solarized-dark-256.muttrc - no because it doesn't really work ya radge + +set folder = ~/.mail/ # mailbox location +set alias_file = ~/.mutt/aliases # where to store aliases +set header_cache = ~/.mutt/cache/headers # where to store headers +set message_cachedir = ~/.mutt/cache/bodies # where to store bodies +set certificate_file = ~/.mutt/certificates # where to store certs +set mailcap_path = ~/.mutt/mailcap # entries for filetypes +set tmpdir = ~/.mutt/temp # where to keep temp files +set signature = ~/.mutt/signature # my signature file + +# Allow forwarding of attachments with emails +set mime_forward +set mime_forward_rest + +# Basic Options -------------------------------------- +set wait_key = no # shut up, mutt +set mbox_type = Maildir # mailbox type +set timeout = 3 # idle time before scanning +set mail_check = 0 # minimum time between scans +#unset move # gmail does that +set delete # don't ask, just do +unset confirmappend # don't ask, just do! +set quit # don't ask, just do!! +unset mark_old # read/new is good enough for me +#set beep_new # bell on new mails +set pipe_decode # strip headers and eval mimes when piping +set thorough_search # strip headers and eval mimes before searching + +# nicer text +set text_flowed=yes + +# Sidebar Patch -------------------------------------- +#set sidebar_delim = '│' +#set sidebar_visible = yes +#set sidebar_width = 24 +## not working in xubuntu set sidebar_shortpath = yes +#set sidebar_sort = yes +## Paths ---------------------------------------------- +#color sidebar_new color221 color233 + +# Status Bar ----------------------------------------- +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 )?───" + +# Header Options ------------------------------------- +ignore * # ignore all headers +unignore from: to: cc: date: bcc: subject: # show only these +unhdr_order * # some distros order things by default +hdr_order from: to: cc: bcc: date: subject: # and in this order + +# Account Settings ----------------------------------- + +# Default inbox. +set spoolfile = "+matt-matthewlemon.com/INBOX" + +# Alternate email addresses. +#alternates <shit goes in here> + +# Mailboxes to show in the sidebar. + + mailboxes +matt-matthewlemon.com/INBOX \ + +matt-matthewlemon.com/INBOX.Archive \ + +matt-matthewlemon.com/INBOX.Sent\ Items \ + +matt-matthewlemon.com/INBOX.Drafts \ +# +matt-matthewlemon.com/INBOX.Gmail.Archive \ + +matt-matthewlemon.com/INBOX.Trash \ +# +temporary/search \ + +# Other special folders. +set mbox = "+matt-matthewlemon.com/INBOX.Archive" +set postponed = "+matt-matthewlemon.com/INBOX.Drafts" + +# Index View Options --------------------------------- +set date_format = "%d-%m-%Y" +set index_format = "[%Z] %B %D %-20.20F %s" +set sort = threads # like gmail +set sort_aux = reverse-last-date-received # like gmail +set uncollapse_jump # don't collapse on an unread message +set sort_re # thread based on regex +set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" + +# Index Key Bindings --------------------------------- +#bind index gg first-entry +bind index G last-entry + +bind index R group-reply +bind index <tab> sync-mailbox +bind index <space> collapse-thread + +# Ctrl-R to mark all as read +macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read" + +# Sync email +macro index O "<shell-escape>offlineimap<enter>" "run offlineimap to sync all mail" +macro index o "<shell-escape>offlineimap -qf INBOX<enter>" "run offlineimap to sync inbox" + +# Saner copy/move dialogs +macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox" +macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox" + +# Sidebar Navigation --------------------------------- +bind index,pager <down> sidebar-next +bind index,pager <up> sidebar-prev +bind index,pager <right> sidebar-open + +# Pager View Options --------------------------------- +set pager_index_lines = 10 # number of index lines to show +set pager_context = 3 # number of context lines to show +set pager_stop # don't go to next message automatically +set menu_scroll # scroll in menus +set tilde # show tildes like in vim +unset markers # no ugly plus signs + +set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" +alternative_order text/plain text/enriched text/html + +# fix background colour +#color normal white black + +# identifies URLs + +# 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 <return> view-mailcap + +# open links +macro pager \Cu "|urlview<enter>" "call urlview to open links" + +# Compose View Options ------------------------------- +set realname = "Matthew Lemon" # who am i? +set envelope_from # which from? +set sig_dashes # dashes before sig +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 +unset mime_forward # forward attachments as part of 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 = "vim" # Use terminal Vim to compose email. +set editor = "nvim %s" + +set from = "matt@matthewlemon.com" +set sendmail = "/usr/bin/msmtp -a matthewlemon" +set sendmail_wait = 0 +set record = "+matt-matthewlemon.com/INBOX.Sent\ Items" + +bind compose p postpone-message +bind index p recall-message + +# Get mutt to understand the contacts command line prog which reads Contacts +#set query_command = "contacts -Sf '%eTOKEN%n' '%s' | sed -e 's/TOKEN/\t/g'" + +## Abook +set query_command= "abook --mutt-query '%s'" +macro generic,index,pager \ca "<shell-escape>abook<return>" "launch abook" +macro index,pager A "<pipe-message>abook --add-email<return>" "Add this sender to Abook" +bind editor <Tab> complete-query +bind editor ^T complete + +# Better searching in mutt +bind index N search-opposite +bind pager N search-opposite +macro index a "<limit>all\n" "show all messages (undo limit)" + +# get an email from mutt to taskwarrior +macro index T "<pipe-message>mutt2task<enter> <move-message>+matt-matthewlemon.com/INBOX.Archive<enter>" + +# Handle searching using notmuch (see Steve Losh article) +# this doesn't work on linux so using another macro index S "<enter-command>unset wait_key<enter><shell-escape>mutt-notmuch-py.py ~/.mail/temporary/search<enter><change-folder-readonly>+temporary/search<enter>" "search mail (using notmuch)" + + +#new notmuch-mutt for linux + +macro index <F8> \ +"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\ +<shell-escape>notmuch-mutt -r --prompt search<enter>\ +<change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\ +<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \ + "notmuch: search mail" + +macro index <F9> \ +"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\ +<pipe-message>notmuch-mutt -r thread<enter>\ +<change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\ +<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \ + "notmuch: reconstruct thread" + +macro index <F6> \ +"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\ +<pipe-message>notmuch-mutt tag -- -inbox<enter>\ +<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \ + "notmuch: remove message from inbox" + + +# old Losh OSX-based orientation +#macro index <F8> "<enter-command>unset wait_key<enter><shell-escape>/usr/bin/notmuch-mutt --prompt search<enter><change-folder-readonly>~/.cache/mutt_results<enter>" "search mail (using notmuch)" +#macro index <F9> "<enter-command>unset wait_key<enter><pipe-message>/usr/bin/notmuch-mutt thread<enter><change-folder-readonly>~/.cache/mutt_results<enter><enter-command>set wait_key<enter>" "search and reconstruct owning thread (using notmuch)" +# +#source ~/.mutt/gpg.rc # Use GPG +#source ~/.mutt/auto_views # Define auto_views. +source ~/.mutt/aliases # Load in my aliases. +source ~/.mutt/subscriptions # Define the list of subscribed mailing lists. +#source ~/.mutt/mailboxes # Define the list of folders that receive mail. +#source ~/.mutt/headers # Configure header display. +#source ~/.mutt/folder-hooks # Define folder-hooks. +#source ~/.mutt/save-hooks # Define save-hooks. +#source ~/.mutt/fcc-hooks # Define fcc-hooks. +#source ~/.mutt/message-hooks # Define message hooks. +#source ~/.mutt/bindings # Define key bindings. +#source ~/.mutt/macros # Define macros. +source ~/.mutt/colours # Define colours. +#source ~/.mutt/sidebar # Define sidebar support (requires sidebar patch) +# +# MAILCAP +auto_view text/html diff --git a/muttrc-gmail b/muttrc-gmail new file mode 100644 index 0000000..f5b01da --- /dev/null +++ b/muttrc-gmail @@ -0,0 +1,155 @@ +set folder = ~/.mail/ # mailbox location +set alias_file = ~/.mutt/aliases # where to store aliases +set header_cache = ~/.mutt/cache/headers # where to store headers +set message_cachedir = ~/.mutt/cache/bodies # where to store bodies +set certificate_file = ~/.mutt/certificates # where to store certs +set mailcap_path = ~/.mutt/mailcap # entries for filetypes +set tmpdir = ~/.mutt/temp # where to keep temp files +set signature = ~/.mutt/signature # my signature file +# +# Allow forwarding of attachments with emails +set mime_forward +set mime_forward_rest + +# Basic Options -------------------------------------- +set wait_key = no # shut up, mutt +set mbox_type = Maildir # mailbox type +set timeout = 3 # idle time before scanning +set mail_check = 0 # minimum time between scans +unset move # gmail does that +set delete # don't ask, just do +unset confirmappend # don't ask, just do! +set quit # don't ask, just do!! +unset mark_old # read/new is good enough for me +#set beep_new # bell on new mails +set pipe_decode # strip headers and eval mimes when piping +set thorough_search # strip headers and eval mimes before searching + +# Account Settings ----------------------------------- +set mbox_type = Maildir +set folder = "~/.mail/" +set from = "matthew.lemon@gmail.com" +set spoolfile = "+matthew.lemon-gmail.com/INBOX" +set sendmail = "/usr/bin/msmtp -a gmail" +set mbox = "+matthew.lemon-gmail.com/INBOX" +set postponed = "+matthew.lemon-gmail.com/[Gmail].Drafts" +mailboxes +matthew.lemon-gmail.com/INBOX \ + +matthew.lemon-gmail.com/'[Gmail].All Mail' \ + +matthew.lemon-gmail.com/'[Gmail].Archive' \ + +matthew.lemon-gmail.com/'[Gmail].Bin' \ + +matthew.lemon-gmail.com/'[Gmail].Important' \ + +matthew.lemon-gmail.com/'[Gmail].Starred' \ + +# Other special folders. +#set mbox = "+matt-matthewlemon.com/INBOX.Archive" +#set postponed = "+matt-matthewlemon.com/INBOX.Drafts" + +# Index View Options --------------------------------- +set date_format = "%d-%m-%Y" +set index_format = "[%Z] %B %D %-20.20F %s" +set sort = threads # like gmail +set sort_aux = reverse-last-date-received # like gmail +set uncollapse_jump # don't collapse on an unread message +set sort_re # thread based on regex +set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" + +# Index Key Bindings --------------------------------- +#bind index gg first-entry +bind index G last-entry + +bind index R group-reply +bind index <tab> sync-mailbox +bind index <space> collapse-thread +# +## Abook +set query_command= "abook --mutt-query '%s'" +macro generic,index,pager \ca "<shell-escape>abook<return>" "launch abook" +macro index,pager A "<pipe-message>abook --add-email<return>" "Add this sender to Abook" +bind editor <Tab> complete-query +bind editor ^T complete + +# Ctrl-R to mark all as read +macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read" + +# Sync email +macro index O "<shell-escape>offlineimap<enter>" "run offlineimap to sync all mail" +macro index o "<shell-escape>offlineimap -qf INBOX<enter>" "run offlineimap to sync inbox" + +# Saner copy/move dialogs +macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox" +macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox" + +# Sidebar Navigation --------------------------------- +bind index,pager <down> sidebar-next +bind index,pager <up> sidebar-prev +bind index,pager <right> sidebar-open + +# Pager View Options --------------------------------- +set pager_index_lines = 10 # number of index lines to show +set pager_context = 3 # number of context lines to show +set pager_stop # don't go to next message automatically +set menu_scroll # scroll in menus +set tilde # show tildes like in vim +unset markers # no ugly plus signs + +set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" +alternative_order text/plain text/enriched text/html + +# fix background colour +#color normal white black + +# identifies URLs + +# 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 <return> view-mailcap + +# open links +macro pager \Cu "|urlview<enter>" "call urlview to open links" + +# Compose View Options ------------------------------- +set realname = "Matthew Lemon" # who am i? +set envelope_from # which from? +set sig_dashes # dashes before sig +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 +unset mime_forward # forward attachments as part of 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 = "vim" # Use terminal Vim to compose email. +set editor = "nvim %s" +# nicer text +set text_flowed=yes + +#source ~/.mutt/gpg.rc # Use GPG +#source ~/.mutt/auto_views # Define auto_views. +source ~/.mutt/aliases # Load in my aliases. +source ~/.mutt/subscriptions # Define the list of subscribed mailing lists. +#source ~/.mutt/mailboxes # Define the list of folders that receive mail. +#source ~/.mutt/headers # Configure header display. +#source ~/.mutt/folder-hooks # Define folder-hooks. +#source ~/.mutt/save-hooks # Define save-hooks. +#source ~/.mutt/fcc-hooks # Define fcc-hooks. +#source ~/.mutt/message-hooks # Define message hooks. +#source ~/.mutt/bindings # Define key bindings. +#source ~/.mutt/macros # Define macros. +source ~/.mutt/colours # Define colours. +#source ~/.mutt/sidebar # Define sidebar support (requires sidebar patch) +# +# MAILCAP +auto_view text/html |