From 5a508191607094a0bcf7f081f447fda6bd159bff Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Tue, 14 May 2019 19:29:55 +0200 Subject: [PATCH] Feat: Install neomutt and its config files --- .../benjamin.jm.bertrand@gmail.com.muttrc | 43 ++++++++++++++++++ files/dotfiles/mutt/config.muttrc | 21 +++++++++ files/dotfiles/mutt/dracula.muttrc | 44 ++++++++++++++++++ files/dotfiles/mutt/keybinding.muttrc | 17 +++++++ .../dotfiles/mutt/lafrite26@gmail.com.muttrc | 45 +++++++++++++++++++ files/dotfiles/mutt/opytex.muttrc | 39 ++++++++++++++++ tasks/arch_CLI_packages.yml | 1 + tasks/dotfiles_desktop.yml | 8 ++++ 8 files changed, 218 insertions(+) create mode 100644 files/dotfiles/mutt/benjamin.jm.bertrand@gmail.com.muttrc create mode 100644 files/dotfiles/mutt/config.muttrc create mode 100644 files/dotfiles/mutt/dracula.muttrc create mode 100644 files/dotfiles/mutt/keybinding.muttrc create mode 100644 files/dotfiles/mutt/lafrite26@gmail.com.muttrc create mode 100644 files/dotfiles/mutt/opytex.muttrc diff --git a/files/dotfiles/mutt/benjamin.jm.bertrand@gmail.com.muttrc b/files/dotfiles/mutt/benjamin.jm.bertrand@gmail.com.muttrc new file mode 100644 index 0000000..c5022ea --- /dev/null +++ b/files/dotfiles/mutt/benjamin.jm.bertrand@gmail.com.muttrc @@ -0,0 +1,43 @@ +set realname = "Benjamin Bertrand" +set from = "benjamin.jm.bertrand@gmail.com" +set my_pass = `pass show mail/benjamin.jm.bertrand@gmail.com | head -n 1` + +set smtp_url = "smtps://benjamin.jm.bertrand@gmail.com@smtp.gmail.com:465" +set smtp_pass = $my_pass + +set ssl_force_tls = yes +set ssl_starttls = yes + + +set folder = "~/.mail/benjamin.jm.bertrand" +set spoolfile = "$folder/INBOX" +set postponed = "$folder/Drafts" +set record = "$folder/Sent" +set mbox = "$folder/Archive" +set trash = "$folder/Corbeille" + +mailboxes =INBOX =Sent =Archive =Trash =Drafts + +bind index,pager,attach g noop +bind index,pager,attach gi noop +bind index,pager,attach ga noop +bind index,pager,attach gd noop +bind index,pager,attach gt noop +bind index,pager,attach gs noop +macro index gi "=INBOX" "Go to inbox" +macro index ga "=Archive" "Go to all mail" +macro index gd "=Drafts" "Go to drafts" +macro index gt "=Trash" "Go to trash" +macro index gs "=Sent\ Items" "Go to trash" + +bind index,pager m noop +bind index,pager mt noop +bind index,pager ma noop +macro index,pager mt "=Trash" "Trash" +macro index,pager ma "=Archive" "Archive" + +source ~/.config/mutt/config.muttrc +source ~/.config/mutt/keybinding.muttrc +source ~/.config/mutt/dracula.muttrc + +# vim: ft=muttrc diff --git a/files/dotfiles/mutt/config.muttrc b/files/dotfiles/mutt/config.muttrc new file mode 100644 index 0000000..c36324e --- /dev/null +++ b/files/dotfiles/mutt/config.muttrc @@ -0,0 +1,21 @@ +set mail_check = 120 +set imap_keepalive = 300 + +set editor = "vim -c Goyo" +set sort = threads +set sort_aux = reverse-last-date-received + +set fast_reply = yes +set include = yes # include message in replies + +set pager_stop = yes # don't go to next message automatically + +set query_command = "khard email --parsable %s" +bind editor complete-query +bind editor ^T complete +macro index,pager A \ + "khard add-email" \ + "add the sender email address to khard" + +set index_format = "%4C %Z %-15.15L %{%d%b%y} %s" +# vim: ft=muttrc diff --git a/files/dotfiles/mutt/dracula.muttrc b/files/dotfiles/mutt/dracula.muttrc new file mode 100644 index 0000000..49aec97 --- /dev/null +++ b/files/dotfiles/mutt/dracula.muttrc @@ -0,0 +1,44 @@ +############################################################################### +# Dracula Theme for Mutt: https://draculatheme.com/ +# +# @author Paul Townsend + +# general ------------ foreground ---- background ----------------------------- +color error color231 color212 +color indicator color231 color241 +color markers color210 default +color message default default +color normal default default +color prompt default default +color search color84 default +color status color141 color236 +color tilde color231 default +color tree color141 default + +# message index ------ foreground ---- background ----------------------------- +color index color210 default ~D # deleted messages +color index color84 default ~F # flagged messages +color index color117 default ~N # new messages +color index color212 default ~Q # messages which have been replied to +color index color215 default ~T # tagged messages +color index color141 default ~v # messages part of a collapsed thread + +# message headers ---- foreground ---- background ----------------------------- +color hdrdefault color117 default +color header color231 default ^Subject:.* + +# message body ------- foreground ---- background ----------------------------- +color attachment color228 default +color body color231 default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+ # email addresses +color body color228 default (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+ # URLs +color body color231 default (^|[[:space:]])\\*[^[:space:]]+\\*([[:space:]]|$) # *bold* text +color body color231 default (^|[[:space:]])_[^[:space:]]+_([[:space:]]|$) # _underlined_ text +color body color231 default (^|[[:space:]])/[^[:space:]]+/([[:space:]]|$) # /italic/ text +color quoted color61 default +color quoted1 color117 default +color quoted2 color84 default +color quoted3 color215 default +color quoted4 color212 default +color signature color212 default +# +# vim: ft=muttrc diff --git a/files/dotfiles/mutt/keybinding.muttrc b/files/dotfiles/mutt/keybinding.muttrc new file mode 100644 index 0000000..43a8d32 --- /dev/null +++ b/files/dotfiles/mutt/keybinding.muttrc @@ -0,0 +1,17 @@ +bind pager j next-line +bind pager k previous-line +bind pager h next-undeleted +bind pager l previous-undeleted +bind attach,index,pager \CD next-page +bind attach,index,pager \CU previous-page +bind pager gg top +bind pager G bottom +bind attach,index gg first-entry +bind attach,index G last-entry + +bind index,pager,attach,compose H "display-toggle-weed" +bind index w mail + +macro index S "mbsync -Va" "Synchronize mailbox with mbsync" + +# vim: ft=muttrc diff --git a/files/dotfiles/mutt/lafrite26@gmail.com.muttrc b/files/dotfiles/mutt/lafrite26@gmail.com.muttrc new file mode 100644 index 0000000..b950199 --- /dev/null +++ b/files/dotfiles/mutt/lafrite26@gmail.com.muttrc @@ -0,0 +1,45 @@ +set realname = "Benjamin Bertrand" +set from = "lafrite26@gmail.com" +set my_pass = `pass show mail/lafrite26@gmail.com | head -n 1` + +set folder = "imaps://lafrite26@gmail.com@imap.gmail.com:993" +set imap_pass = $my_pass +set smtp_url = "smtps://lafrite26@gmail.com@smtp.gmail.com:465" +set smtp_pass = $my_pass + +set ssl_force_tls = yes +set ssl_starttls = yes + +set folder = "~/.mail/lafrite26" +set spoolfile = "$folder/INBOX" +set postponed = "$folder/Drafts" +set record = "$folder/Sent" +set mbox = "$folder/Archive" +set trash = "$folder/Trash" + +mailboxes =INBOX =Sent =Archive =Trash =Drafts + +bind index,pager,attach g noop +bind index,pager,attach gi noop +bind index,pager,attach ga noop +bind index,pager,attach gd noop +bind index,pager,attach gt noop +bind index,pager,attach gs noop +macro index gi "=INBOX" "Go to inbox" +macro index ga "=Archive" "Go to all mail" +macro index gd "=Drafts" "Go to drafts" +macro index gt "=Trash" "Go to trash" +macro index gs "=Sent\ Items" "Go to trash" + +bind index,pager m noop +bind index,pager mt noop +bind index,pager ma noop +macro index,pager mt "=Trash" "Trash" +macro index,pager ma "=Archive" "Archive" + + +source ~/.config/mutt/config.muttrc +source ~/.config/mutt/keybinding.muttrc +source ~/.config/mutt/dracula.muttrc + +# vim: ft=muttrc diff --git a/files/dotfiles/mutt/opytex.muttrc b/files/dotfiles/mutt/opytex.muttrc new file mode 100644 index 0000000..24b07bb --- /dev/null +++ b/files/dotfiles/mutt/opytex.muttrc @@ -0,0 +1,39 @@ +set from = "benjamin.bertrand@opytex.org" +set realname = "Benjamin Bertrand" +set my_pass = `pass show mail/mailfence/Takanuva | head -n 1` + +set smtp_url = "smtps://benjamin.bertrand@opytex.org@smtp.mailfence.com:465" +set smtp_pass = $my_pass + +set ssl_force_tls = yes +set ssl_starttls = yes +set folder = "~/.mail/opytex" +set spoolfile = "$folder/INBOX" +set postponed = "$folder/Drafts" +set record = "$folder/Sent\ Items" +set mbox = "$folder/Archive" +set trash = "$folder/Trash" + +mailboxes =INBOX =Sent\ Items =Archive =Trash =Drafts + +bind index,pager,attach g noop +bind index,pager,attach gi noop +bind index,pager,attach ga noop +bind index,pager,attach gd noop +bind index,pager,attach gt noop +bind index,pager,attach gs noop +macro index gi "=INBOX" "Go to inbox" +macro index ga "=Archive" "Go to all mail" +macro index gd "=Drafts" "Go to drafts" +macro index gt "=Trash" "Go to trash" +macro index gs "=Sent\ Items" "Go to trash" + +bind index,pager m noop +bind index,pager mt noop +bind index,pager ma noop +macro index,pager mt "=Trash" "Trash" +macro index,pager ma "=Archive" "Archive" + + + +# vim: ft=muttrc diff --git a/tasks/arch_CLI_packages.yml b/tasks/arch_CLI_packages.yml index 31f92c2..31b3c14 100644 --- a/tasks/arch_CLI_packages.yml +++ b/tasks/arch_CLI_packages.yml @@ -38,6 +38,7 @@ - vifm - youtube-dl - gnupg + - neomutt state: present tags: - first_deployement diff --git a/tasks/dotfiles_desktop.yml b/tasks/dotfiles_desktop.yml index b6d6513..9dd0403 100644 --- a/tasks/dotfiles_desktop.yml +++ b/tasks/dotfiles_desktop.yml @@ -76,6 +76,14 @@ group: "{{ item.group }}" with_items: "{{ me }}" +- name: mutt config files + copy: + src: files/dotfiles/mutt/ + dest: /home/{{ item.username }}/.config/mutt/ + owner: "{{ item.username }}" + group: "{{ item.group }}" + with_items: "{{ me }}" + - name: Install imap synchroniser (Archlinux) pacman: name: