summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2018-07-02 09:12:18 -0700
committerBen Sima <ben@bsima.me>2018-07-02 09:26:38 -0700
commitc6bb5f5fb1de3c26350cf0a740040df249cfc3ec (patch)
treeb63e0b200c823903c5343298c39f483a5c9a1e89
parenta5f8f838e2f4362d0a720739c75ff6ce958a0782 (diff)
Add and configure (neo)mutt
-rw-r--r--home.nix7
-rw-r--r--mutt/solarized.muttrc146
-rw-r--r--muttrc73
-rw-r--r--packages.nix1
4 files changed, 227 insertions, 0 deletions
diff --git a/home.nix b/home.nix
index f0f4e15..78fb797 100644
--- a/home.nix
+++ b/home.nix
@@ -11,6 +11,13 @@ in
LANG = "en_US.UTF-8";
PATH = "~/.cabal/bin:~/.local/bin:$PATH";
};
+ file = {
+ mutt = {
+ text = (builtins.readFile ./muttrc) +
+ (builtins.readFile ./mutt/solarized.muttrc);
+ target = ".muttrc";
+ };
+ };
};
fonts.fontconfig.enableProfileFonts = true;
diff --git a/mutt/solarized.muttrc b/mutt/solarized.muttrc
new file mode 100644
index 0000000..3588389
--- /dev/null
+++ b/mutt/solarized.muttrc
@@ -0,0 +1,146 @@
+# vim: filetype=muttrc
+
+# Based on https://github.com/altercation/mutt-colors-solarized/
+#
+# The original by @altercation only works if mutt is linked against slang, but
+# on NixOS both mutt and neomutt are linked against ncurses. This color scheme
+# has been modified to work with ncurses.
+
+# Highlight my name and other personally relevant strings
+color body color136 default "(ben|sima|bsima)"
+
+# Highlight messages which mention my name in the body
+color index color136 default "~b \"ben(_g|\!| sima)|bsima\" !~N !~T !~F !~p !~P"
+color index color136 color37 "~b \"ben(_g|\!| sima)|bsima\" ~T !~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 default
+color error color160 default
+color tilde color254 default
+color message color37 default
+color markers color160 default
+color attachment default default
+color search color61 default
+color status color244 color254
+color indicator color230 color136
+color tree color136 default # arrow in threads
+
+# Basic monocolor screen
+mono bold bold
+mono underline underline
+mono indicator reverse
+mono error bold
+
+# Index
+color index color160 default "~D(!~p|~p)" # deleted
+color index color254 default ~F # flagged
+color index color166 default ~= # duplicate messages
+color index color245 default "~A!~N!~T!~p!~Q!~F!~D!~P" # the rest
+color index color160 default "~A" # all messages
+color index color166 default "~E" # expired messages
+color index color33 default "~N" # new messages
+color index color33 default "~O" # old messages
+color index color61 default "~Q" # messages that have been replied to
+color index color245 default "~R" # read messages
+color index color33 default "~U" # unread messages
+color index color33 default "~U~$" # unread, unreferenced messages
+color index color244 default "~v" # messages part of a collapsed thread
+color index color244 default "~P" # messages from me
+color index color37 default "~p!~F" # messages to me
+color index color37 default "~N~p!~F" # new messages to me
+color index color37 default "~U~p!~F" # unread messages to me
+color index color245 default "~R~p!~F" # messages to me
+color index color160 default "~F" # flagged messages
+color index color160 default "~F~p" # flagged messages to me
+color index color160 default "~N~F" # new flagged messages
+color index color160 default "~N~F~p" # new flagged messages to me
+color index color160 default "~U~F~p" # new flagged messages to me
+color index color254 color160 "~D" # deleted messages
+color index color239 default "~v~(!~N)" # collapsed thread with no unread
+color index color136 default "~v~(~N)" # collapsed thread with some unread
+color index color64 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 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 default "~(~N)" # messages in threads with some unread
+color index color64 default "~S" # superseded messages
+color index color160 default "~T" # tagged messages
+color index color166 color160 "~=" # duplicated messages
+
+
+# Message headers
+
+color header color245 default "^"
+color hdrdefault color245 default
+color header color244 default "^(From)"
+color header color33 default "^(Subject)"
+
+
+# Message body
+
+color quoted color33 default
+color quoted1 color37 default
+color quoted2 color136 default
+color quoted3 color160 default
+color quoted4 color166 default
+
+color signature color245 default
+color bold color254 default
+color underline color254 default
+color normal color240 default
+
+color body color239 default "[;:][-o][)/(|]" # emoticons
+color body color239 default "[;:][)(|]" # emoticons
+color body color239 default "[*]?((N)?ACK|CU|LOL|SCNR|BRB|BTW|CWYL|\
+ |FWIW|vbg|GD&R|HTH|HTHBE|IMHO|IMNSHO|\
+ |IRL|RTFM|ROTFL|ROFL|YMMV)[*]?"
+color body color239 default "[ ][*][^*]*[*][ ]?" # more emoticon?
+color body color239 default "[ ]?[*][^*]*[*][ ]" # more emoticon?
+
+
+## pgp
+color body color160 default "(BAD signature)"
+color body color37 default "(Good signature)"
+color body color230 default "^gpg: Good signature .*"
+color body color244 default "^gpg: "
+color body color244 color160 "^gpg: BAD signature from.*"
+mono body bold "^gpg: Good signature"
+mono body bold "^gpg: BAD signature from.*"
+
+
+# yes, an insane URL regex
+color body color160 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 color160 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 default default "<[Gg]>" # <g>
+color body default default "<[Bb][Gg]>" # <bg>
+color body color136 default " [;:]-*[})>{(<|]" # :-) etc...
+
+# *bold*
+color body color33 default "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)"
+mono body bold "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)"
+
+# _underline_
+color body color33 default "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)"
+mono body underline "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)"
+
+# /italic/ (Sometimes gets directory names)
+color body color33 default "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)"
+mono body underline "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)"
+
+# Border lines.
+color body color33 default "( *[-+=#*~_]){6,}"
diff --git a/muttrc b/muttrc
new file mode 100644
index 0000000..451c88a
--- /dev/null
+++ b/muttrc
@@ -0,0 +1,73 @@
+# vim: filetype=muttrc
+
+set realname = "Ben Sima"
+set mbox_type = Maildir
+
+my_hdr X-URL: https://www.bsima.me
+
+set editor = "vim -f"
+set mail_check = 60
+set timeout = 60
+set header_cache = ~/.mutt/cache/headers
+set message_cachedir = ~/.mutt/cache/bodies
+set certificate_file =~/.mutt/certificates
+
+set move = no
+set include
+set auto_tag = yes
+alternative_order text/plain text/html *
+auto_view text/html
+bind editor ^T complete
+set pager_index_lines = 10
+set implicit_autoview = yes
+
+set sort_aux = 'last-date-received'
+set index_format = "[%Z] %D %-20.20F %s"
+set date_format = "%m.%d..%H.%M"
+set nostrict_threads
+set sort = 'threads'
+set markers = no # hide line-wrap markers
+
+# Ignore all headers
+ignore *
+
+# Then un-ignore the ones I want to see
+unignore From:
+unignore To:
+unignore Reply-To:
+unignore Subject:
+unignore Date:
+unignore Organization:
+unignore Newsgroups:
+unignore CC:
+unignore BCC:
+unignore User-Agent:
+
+# Now order the visable header lines
+hdr_order Date: From: To: CC: BCC: Reply-To: Subject: Organization: User-Agent:
+
+set forward_format = "Fwd: %s"
+set fast_reply=yes
+set forward_decode # decode when forwarding
+set reply_to # reply to Reply to: field
+set use_envelope_from = yes
+set text_flowed = yes
+
+set my_pw = "`pass bnet/helium/mail/ben`"
+
+set imap_user = "ben@bsima.me"
+set imap_pass = $my_pw
+
+set from = "ben@bsima.me"
+set smtp_url = "smtp://ben@bsima.me@mail.bsima.me:587"
+set smtp_pass = $my_pw
+
+set ssl_starttls = "yes"
+
+set folder = "~/Mail/ben@bsima.me"
+set spoolfile = "+INBOX"
+set postponed = "+Drafts"
+set record = "+Sent"
+set imap_pipeline_depth = 0
+
+
diff --git a/packages.nix b/packages.nix
index 03324a6..08f6844 100644
--- a/packages.nix
+++ b/packages.nix
@@ -27,6 +27,7 @@ pkgs.lsof
pkgs.mononoki
pkgs.mplayer
pkgs.mpv
+pkgs.neomutt
pkgs.networkmanager_vpnc
pkgs.nix-prefetch-scripts
pkgs.offlineimap