From 0d1f0b394f13f3016a60707b20ec46bec22e0bc5 Mon Sep 17 00:00:00 2001 From: Nicolas Duhamel Date: Sat, 28 Apr 2018 16:09:16 +0200 Subject: [PATCH] Add neomutt conf --- user/neomutt/.config/neomutt/accounts | 18 ++++ user/neomutt/.config/neomutt/colors | 103 +++++++++++++++++++ user/neomutt/.config/neomutt/index | 10 ++ user/neomutt/.config/neomutt/keybinding | 131 ++++++++++++++++++++++++ user/neomutt/.config/neomutt/mailcap | 6 ++ user/neomutt/.config/neomutt/neomuttrc | 46 +++++++++ user/neomutt/.config/neomutt/pager | 11 ++ 7 files changed, 325 insertions(+) create mode 100644 user/neomutt/.config/neomutt/accounts create mode 100644 user/neomutt/.config/neomutt/colors create mode 100644 user/neomutt/.config/neomutt/index create mode 100644 user/neomutt/.config/neomutt/keybinding create mode 100644 user/neomutt/.config/neomutt/mailcap create mode 100644 user/neomutt/.config/neomutt/neomuttrc create mode 100644 user/neomutt/.config/neomutt/pager diff --git a/user/neomutt/.config/neomutt/accounts b/user/neomutt/.config/neomutt/accounts new file mode 100644 index 0000000..a8afeec --- /dev/null +++ b/user/neomutt/.config/neomutt/accounts @@ -0,0 +1,18 @@ +# vim: filetype=muttrc + +#Account Settings ----------------------------------- +set spoolfile = "+INBOX" + +mailboxes +INBOX \ + +Archive \ + +Administratif \ + +Pneumo \ + +Commandes \ + +Maison \ + +Sent \ + +Drafts \ + +Trash \ + +Junk + +set mbox = "+Archive" +set postponed = "+Drafts" diff --git a/user/neomutt/.config/neomutt/colors b/user/neomutt/.config/neomutt/colors new file mode 100644 index 0000000..0738bdc --- /dev/null +++ b/user/neomutt/.config/neomutt/colors @@ -0,0 +1,103 @@ +# vim: filetype=muttrc + +# 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 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 "~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 +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 color64 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 ----------------------------------------------------------------- + +# Patch colors +color body brightred color234 "^-.*" +color body brightgreen color234 "^[+].*" +color body brightwhite color234 "^diff --git.*" +color body brightwhite color234 "^index [a-f0-9].*" +color body brightyellow color234 "^@@.*" + +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<>\"]" diff --git a/user/neomutt/.config/neomutt/index b/user/neomutt/.config/neomutt/index new file mode 100644 index 0000000..ef17ab8 --- /dev/null +++ b/user/neomutt/.config/neomutt/index @@ -0,0 +1,10 @@ +# vim: filetype=muttrc + +set date_format = "%d %b %y" +set index_format = "[%Z] %D %-20.20F %s" +set sort = threads +set sort_aux = reverse-last-date-received +set uncollapse_jump +set sort_re +set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" + diff --git a/user/neomutt/.config/neomutt/keybinding b/user/neomutt/.config/neomutt/keybinding new file mode 100644 index 0000000..fb7909b --- /dev/null +++ b/user/neomutt/.config/neomutt/keybinding @@ -0,0 +1,131 @@ +# vim: filetype=muttrc + +######## +# Index +# +# +# Reset + +bind index \CB noop +bind index \CD noop +bind index \CE noop +bind index \CF noop +bind index \CK noop +bind index \CN noop +bind index \CP noop +bind index \CR noop +bind index \CT noop +bind index \CU noop +bind index noop +bind index noop +bind index . noop +bind index F noop +bind index noop +bind index C noop +bind index P noop +bind index V noop +bind index b noop +bind index c noop +bind index d noop +bind index e noop +bind index k noop +bind index l noop +bind index n noop +bind index p noop +bind index r noop +bind index s noop +bind index t noop +bind index u noop +bind index v noop +bind index \# noop +bind index $ noop +bind index % noop +bind index & noop +bind index @ noop +bind index C noop +bind index D noop +bind index M noop +bind index N noop +bind index O noop +bind index P noop +bind index Q noop +bind index T noop +bind index U noop +bind index V noop +bind index W noop +bind index Y noop +bind index a noop +bind index b noop +bind index e noop +bind index q noop + + +# Set +bind index g noop +bind index gg first-entry +bind index G last-entry +bind index gf change-folder + +bind index c copy-message +bind index m save-message +bind index d noop +bind index dd delete-message +bind index dt delete-thread +bind index f forward-message + +bind index s noop +bind index ss flag-message +bind index sf set-flag +bind index Sf clear-flag +bind index sl edit-label +bind index sn toggle-new +bind index sr read-thread #set entire thread read +bind index st tag-entry + +bind index r reply +bind index R group-reply +bind index collapse-thread + +bind index l display-message +bind index display-message +bind index n mail + +bind index z noop +bind index zz sync-mailbox + +bind index Z noop +bind index ZZ quit +bind index ZQ exit + +################## +# Sidebar +# +bind index,pager J sidebar-next +bind index,pager K sidebar-prev +bind index,pager L sidebar-open + +################## +# Pager +# +bind pager z noop +bind pager h noop + +bind pager g noop +bind pager gg top +bind pager G bottom +bind pager k previous-line +bind pager j next-line +bind pager h exit + + +bind pager za view-attachments +macro pager zu " urlscan" + +################## +# Attach +# + +bind attach s noop +macro attach s $HOME/Downloads/y +bind attach l view-attach +bind attach h exit diff --git a/user/neomutt/.config/neomutt/mailcap b/user/neomutt/.config/neomutt/mailcap new file mode 100644 index 0000000..2a36adb --- /dev/null +++ b/user/neomutt/.config/neomutt/mailcap @@ -0,0 +1,6 @@ +text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput + + +audio/*; /usr/bin/xdg-open %s +image/*; /usr/bin/xdg-open %s +application/pdf; /usr/bin/xdg-open %s diff --git a/user/neomutt/.config/neomutt/neomuttrc b/user/neomutt/.config/neomutt/neomuttrc new file mode 100644 index 0000000..6998a4c --- /dev/null +++ b/user/neomutt/.config/neomutt/neomuttrc @@ -0,0 +1,46 @@ +#Paths ---------------------------------------------- +set folder = $HOME/.mail +set alias_file = $XDG_CONFIG_HOME/neomutt/alias +set signature = $XDG_CONFIG_HOME/neomutt/signature +set mailcap_path = $XDG_CONFIG_HOME/neomutt/mailcap +set header_cache = $XDG_CACHE_HOME/neomutt/cache/headers +set message_cachedir = $XDG_CACHE_HOME/neomutt/cache/bodies +set certificate_file = $XDG_CACHE_HOME/neomutt/certificates +set tmpdir = $XDG_RUNTIME_DIR + +#Source file --------------------------------------- +source $XDG_CONFIG_HOME/neomutt/accounts +source $XDG_CONFIG_HOME/neomutt/colors +source $XDG_CONFIG_HOME/neomutt/index +source $XDG_CONFIG_HOME/neomutt/pager +source $XDG_CONFIG_HOME/neomutt/keybinding + + +#Basic options -------------------------------------- +unset help +set wait_key = no +set mbox_type = Maildir +set timeout = 3 +set mail_check = 0 +unset move # not sure, see man neomuttrc +set delete +unset confirmappend +set quit +unset mark_old +set pipe_decode # not sure, strip headers and eval mimes when piping +set thorough_search # same, strip headers and eval mimes before searching + +#Sidebar --------------------------------------------- +set sidebar_visible = yes +set sidebar_width = 24 + +#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 * +unignore from: to: cc: date: subject: +unhdr_order * +hdr_order from: to: cc: date: subject: + diff --git a/user/neomutt/.config/neomutt/pager b/user/neomutt/.config/neomutt/pager new file mode 100644 index 0000000..1f4d930 --- /dev/null +++ b/user/neomutt/.config/neomutt/pager @@ -0,0 +1,11 @@ +# vim: filetype=muttrc + +set pager_index_lines = 10 +set pager_stop +set pager_context = 3 +set menu_scroll +set tilde +unset markers + +alternative_order text/plain text/enriched text/html +auto_view text/html