diff options
Diffstat (limited to 'mutt')
-rw-r--r-- | mutt/aliases | 9 | ||||
-rw-r--r-- | mutt/cache/headers | bin | 0 -> 817152 bytes | |||
-rw-r--r-- | mutt/colors256-light | 94 | ||||
-rw-r--r-- | mutt/colors_purple | 39 | ||||
-rw-r--r-- | mutt/colours | 97 | ||||
-rw-r--r-- | mutt/colours-bak | 69 | ||||
-rw-r--r-- | mutt/mailboxes | 9 | ||||
-rw-r--r-- | mutt/mailcap | 27 | ||||
-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/muttrc-softyellowgreen | 42 | ||||
-rw-r--r-- | mutt/offlineimap.py | 5 | ||||
-rw-r--r-- | mutt/offlineimap.py-bak | 17 | ||||
-rw-r--r-- | mutt/signature | 1 | ||||
-rw-r--r-- | mutt/subscriptions | 7 | ||||
-rwxr-xr-x | mutt/view_attachment.sh | 129 |
17 files changed, 998 insertions, 0 deletions
diff --git a/mutt/aliases b/mutt/aliases new file mode 100644 index 0000000..0db715b --- /dev/null +++ b/mutt/aliases @@ -0,0 +1,9 @@ +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> +alias openbsdlists <openbsdlists@speedymail.com> diff --git a/mutt/cache/headers b/mutt/cache/headers Binary files differnew file mode 100644 index 0000000..af0e864 --- /dev/null +++ b/mutt/cache/headers diff --git a/mutt/colors256-light b/mutt/colors256-light new file mode 100644 index 0000000..8487d67 --- /dev/null +++ b/mutt/colors256-light @@ -0,0 +1,94 @@ +#light colorscheme + +color normal color22 color230 +color indicator color22 color185 +color tree color136 color230 +color status color233 color214 +color error color231 color160 +color message color231 color166 +color signature color240 color230 +color attachment color37 color230 +color search color21 color215 +color tilde color130 color230 +color markers color138 color230 + +#mono bold reverse +#color bold color173 color191 +#mono underline reverse +#color underline color48 color191 + +color quoted color19 color230 # quoted text +color quoted1 color88 color230 +color quoted2 color55 color230 +color quoted3 color16 color230 +color quoted4 color52 color230 +color quoted5 color24 color230 +color quoted6 color96 color230 +color quoted7 color235 color230 +color quoted8 color130 color230 +color quoted9 color26 color230 +# color body cyan color230 "((ftp|http|https)://|news:)[^ >)\"\t]+" +# color body cyan color230 "[-a-z_0-9.+]+@[-a-z_0-9.]+" +# color body red color230 "(^| )\\*[-a-z0-9*]+\\*[,.?]?[ \n]" +# color body green color230 "(^| )_[-a-z0-9_]+_[,.?]?[\n]" +# color body red color230 "(^| )\\*[-a-z0-9*]+\\*[,.?]?[ \n]" +# color body green color230 "(^| )_[-a-z0-9_]+_[,.?]?[ \n]" + +color index color160 color230 ~F # Flagged +color index color20 color228 ~N # New +color index color20 color231 ~O +color index color22 color221 ~T # Tagged +color index color240 color230 ~D # Deleted + +###################### + +#mono body reverse '^(subject):.*' +#color body brightwhite magenta '^(subject):.*' +#mono body reverse '[[:alpha:]][[:alnum:]-]+:' +#color body black cyan '[[:alpha:]][[:alnum:]-]+:' + +###################### +# header + +color hdrdefault color23 color229 +color header color30 color229 '^date:' +color header color22 color229 '^(to|cc|bcc):' +color header color20 color229 '^from:' +color header color124 color229 '^subject:' +color header color31 color229 '^user-agent:' +color header color29 color229 '^reply-to:' + +#color header magenta default '^(status|lines|date|received|sender|references):' +#color header magenta default '^(pr|mime|x-|user|return|content-)[^:]*:' +#color header brightyellow default '^content-type:' +#color header magenta default '^content-type: *text/plain' +# color header brightgreen default '^list-[^:]*:' +#mono header bold '^(subject):.*$' +#color header brightcyan default '^(disposition)' +#color header green default '^(mail-)?followup' +#color header white default '^reply' +#color header brightwhite default '^(resent)' +# color header brightwhite default '^from:' + +###################### +# spam + +### html +#color index blue default '~b "<(img|a |html|body)"' + +### china spam +#color index brightred black '~h "^(content-type:| +).*charset=\"?(big5|gb2312|SHIFT.JIS|euc.kr|windows.125[^2]|iso.[0-9]+.jp|koi[^ ;"])"' + +### sex +#color index brightyellow black "~b '(p$E+n$I+$S|sex|er$E+ct$I+$O+n|p$O+rn$O+|v$I+$A+gr|c$I+$A+$L+$I+$S)'" + +### misc +#color index cyan black '~b "(w$A+tch|r$E+p$L+$I+c$A|d$I+p$L+$O+m|d$E+gr$E+e|pr$I+ce|s$A+les|\\\$[0-9]+)"' + +### drug +#color index white black "~b '(ph$A+rm$A+cy|m$E+d$I+c$A+t$I+$O+n|pr$E+scr$I+pt$I+$O+n|d$I+$S+c$O+$U+nt|p$I+$L+$S|v$A+$L+$I+$U+m|v$I+c$O+d$I+n)'" + + +#mono index bold '~h "^content-type: *(multipart/(mixed|signed|encrypted)|application/)"' +#color index green black '~h "^content-type: *multipart/(signed|encrypted)"' + diff --git a/mutt/colors_purple b/mutt/colors_purple new file mode 100644 index 0000000..818f42c --- /dev/null +++ b/mutt/colors_purple @@ -0,0 +1,39 @@ + +#-------------------snip----------------------- +set allow_ansi=yes + +color normal black default +color quoted color65 default +color quoted1 color138 default +color quoted2 color58 default +color quoted3 color105 default +color quoted4 cyan default +color quoted5 cyan default + +color indicator black color249 +color message green default +color status color139 color254 +color error color58 default +color attachment black default +color signature color253 default +color markers red yellow +color tilde black default +color search black green +color tree black default +color bold black default + +color hdrdefault black default +color header green default '^From:' +color header green default '^Subject:' +color header cyan default '^To:.*corky1951' + +color index color22 default ~N +color index blue default ~F +color index color55 default ~T +color index color52 default ~D + +color body color22 default "(http|https|ftp|news|telnet|finger)://[^ \">\t\r\n]*" +color body color22 default "mailto:[-a-z_0-9.]+ <at> [-a-z_0-9.]+" +color body color22 default "news:[^ \">\t\r\n]*" + +color body green default "[-a-z_0-9.%$]+ <at> [-a-z_0-9.]+\\.[-a-z][-a-z]+" diff --git a/mutt/colours b/mutt/colours new file mode 100644 index 0000000..934de67 --- /dev/null +++ b/mutt/colours @@ -0,0 +1,97 @@ +## Theme kindly inspired from +## http://nongeekshandbook.blogspot.ie/2009/03/mutt-color-configuration.html +#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 +color sidebar_highlight color221 color233 +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 + +# Progress bar - neomutt +color progress white red + +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/mailboxes b/mutt/mailboxes new file mode 100644 index 0000000..6274523 --- /dev/null +++ b/mutt/mailboxes @@ -0,0 +1,9 @@ +mailboxes "+INBOX" "+Archive" "+Drafts" "+Sent" "+Scans" "+Trash" + +virtual-mailboxes "bookmarks" "notmuch://?query=to:bookmark@matthewlemon.com" +virtual-mailboxes "from Jo" "notmuch://?query=from:joanna" +virtual-mailboxes "Harvey" "notmuch://?query=harvey" +virtual-mailboxes "nm-sent" "notmuch://?query=tag:sent" +virtual-mailboxes "nm-inbox" "notmuch://?query=tag:inbox" +virtual-mailboxes "Tasks" "notmuch://?query=to:matt+task@matthewlemon.com or to:matthewlemon+task@protonmail.com or to:madmin+task@rushpost.com" +virtual-mailboxes "last week" "notmuch://?query=date:7days..today" diff --git a/mutt/mailcap b/mutt/mailcap new file mode 100644 index 0000000..9f40b57 --- /dev/null +++ b/mutt/mailcap @@ -0,0 +1,27 @@ +# 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 feh +image/jpeg; ~/.mutt/view_attachment.sh %s jpg feh +image/pjpeg; ~/.mutt/view_attachment.sh %s jpg feh +image/png; ~/.mutt/view_attachment.sh %s png feh +image/gif; ~/.mutt/view_attachment.sh %s gif feh +# +# patches +text/x-patch; vimdiff '%s'; needsterminal + +# PDFs +application/pdf; ~/.mutt/view_attachment.sh %s pdf zathura + +# 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 +text/html; lynx -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/muttrc-softyellowgreen b/mutt/muttrc-softyellowgreen new file mode 100644 index 0000000..c7c1793 --- /dev/null +++ b/mutt/muttrc-softyellowgreen @@ -0,0 +1,42 @@ + +#-------------------snip----------------------- +set allow_ansi=yes + +color normal black color255 +color quoted color236 color255 +color quoted1 color242 color255 +color quoted2 color246 color255 +color quoted3 color252 color255 +#color quoted4 cyan color255 +#color quoted5 cyan color255 + +color indicator black color254 +color message color28 color254 +color status color143 color234 +color error color58 color254 +color attachment black color254 +color signature color252 color254 +color markers color104 color254 +color tilde color69 color254 +color search black color153 +color tree color184 color255 +color bold brightblack color254 + +color hdrdefault black color254 +color header black color254 '^From:' +color header black color254 '^Subject:' +color header black color254 '^To:' + +color index color28 color255 ~N +color index color100 color254 ~F +color index color55 color254 ~T +color index color244 color255 ~D + +color body color18 color254 "(http|https|ftp|news|telnet|finger)://[^ \">\t\r\n]*" +color body color37 color255 "mailto:[-a-z_0-9.]+ <at> [-a-z_0-9.]+" +color body color18 color254 "news:[^ \">\t\r\n]*" +color body color112 color254 "[-a-z_0-9.%$]+ <at> [-a-z_0-9.]+\\.[-a-z][-a-z]+" +color body color112 color254 "^.*Autoview.*$" + + + 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..0b4207a --- /dev/null +++ b/mutt/signature @@ -0,0 +1 @@ +Matthew diff --git a/mutt/subscriptions b/mutt/subscriptions new file mode 100644 index 0000000..bfadc6d --- /dev/null +++ b/mutt/subscriptions @@ -0,0 +1,7 @@ +subscribe debian-user@lists.debian.org +subscribe python-list +subscribe ubuntu-news@lists.ubuntu.com +subscribe announce@openbsd.org +subscribe gabor@szabgab.com +subscribe misc@openbsd.org +subscribe ports@openbsd.org diff --git a/mutt/view_attachment.sh b/mutt/view_attachment.sh new file mode 100755 index 0000000..1ff52ea --- /dev/null +++ b/mutt/view_attachment.sh @@ -0,0 +1,129 @@ +#!/usr/local/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 |