summaryrefslogtreecommitdiff
path: root/.mutt
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2015-12-11 00:34:32 +0000
committerUrbain Vaes <urbain@vaes.uk>2015-12-11 00:34:32 +0000
commit5d2bf58c850b28089931b86ac6b794babcb0fd34 (patch)
treeaab1bcc9bf4e8a5399a66e20684df70bf7f6970e /.mutt
parent871d2af2b7ce385be09a894921557c423e2ead18 (diff)
Add mutt hooks
Diffstat (limited to '.mutt')
-rw-r--r--.mutt/id_gmail2
-rw-r--r--.mutt/id_imperial2
-rw-r--r--.mutt/muttrc103
3 files changed, 50 insertions, 57 deletions
diff --git a/.mutt/id_gmail b/.mutt/id_gmail
new file mode 100644
index 0000000..af1f334
--- /dev/null
+++ b/.mutt/id_gmail
@@ -0,0 +1,2 @@
+set from = "urbain.p.vaes@gmail.com"
+set sendmail="/usr/bin/msmtp -a gmail"
diff --git a/.mutt/id_imperial b/.mutt/id_imperial
new file mode 100644
index 0000000..e4df7f5
--- /dev/null
+++ b/.mutt/id_imperial
@@ -0,0 +1,2 @@
+set from = "u.vaes13@imperial.ac.uk"
+set sendmail="/usr/bin/msmtp -a imperial"
diff --git a/.mutt/muttrc b/.mutt/muttrc
index 64d43c4..f5731a7 100644
--- a/.mutt/muttrc
+++ b/.mutt/muttrc
@@ -1,12 +1,24 @@
+# Folders
+set folder = ~/.mail
+set alias_file = ~/.mutt/alias
+set header_cache = ~/.mutt/cache/headers
+set message_cachedir = ~/.mutt/cache/bodies
+set certificate_file = ~/.mutt/certificates
+set mailcap_path = ~/.mutt/mailcap
+set signature = ~/.mutt/signature
+set tmpdir = ~/.mutt/temp
+
+# Source crypto, aliases, mailboxes
+source ~/.mutt/crypto
+source ~/.mutt/alias
+source ~/.mutt/mailboxes
+
# General information
-set from = "urbain.p.vaes@gmail.com"
-set realname = "Urbain Vaes"
-set use_from = yes
-set envelope_from = yes
+set from = "urbain.p.vaes@gmail.com"
+set realname = "Urbain Vaes"
set weed
# Encryption
-source ~/.mutt/crypto
set crypt_autosign = no
set crypt_replyencrypt = yes
set pgp_auto_decode = yes
@@ -15,15 +27,6 @@ set pgp_sign_as = 716064C0
set pgp_use_gpg_agent = yes
set pgp_timeout = 3600
-# Folders
-set folder = ~/.mail
-set alias_file = ~/.mutt/alias
-set header_cache = ~/.mutt/cache/headers
-set message_cachedir = ~/.mutt/cache/bodies
-set certificate_file = ~/.mutt/certificates
-set mailcap_path = ~/.mutt/mailcap
-set signature = ~/.mutt/signature
-set tmpdir = ~/.mutt/temp
# Maildirs
set spoolfile = "+Main/Main"
@@ -32,35 +35,27 @@ set postponed = "+Main/Drafts"
# Sidebar
set sidebar_width=26
-set sidebar_visible = yes
+set sidebar_visible = no
set sidebar_delim='|'
-
-# Headers
-ignore *
-unignore from: to: cc: date: subject:
-unhdr_order *
-hdr_order from: to: cc: date: subject:
-
-mailboxes +Main/Main \
- +Imperial/Imperial \
- +Hotmail/Hotmail \
- +Gmail/Gmail \
- +Main/Sent \
- +Main/Drafts \
+bind index,pager \Cn sidebar-next
+bind index,pager \Cp sidebar-prev
+bind index,pager O sidebar-open
# Prompts
set delete = yes
set quit = yes
# Pager
-set pager_index_lines = 10
-set pager_context = 0
set pager_stop
-set reverse_alias
-set menu_scroll
-set tilde
+set pager_index_lines = 10
+
+# Misc
unset markers
-set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
+set reverse_alias
+set sort = reverse-date
+
+# HTML messages
+auto_view text/html
alternative_order text/plain text/enriched text/html
# Editor
@@ -70,33 +65,27 @@ set include=yes
# Program to send mails
set sendmail="/usr/bin/msmtp"
-# Sorting options
-set sort = reverse-date
-
-# Alias file
-source ~/.mutt/alias
-
-# HTML messages
-auto_view text/html
# Key bindings
-bind index,pager \Cf next-page
-bind index,pager \Cb previous-page
-bind index,pager "}" sidebar-next
-bind index,pager "{" sidebar-prev
-bind index,pager O sidebar-open
-
-bind index gg first-entry
-bind index G last-entry
-bind index i flag-message
-
-bind pager \Ce next-line
-bind pager \Cy previous-line
-bind pager j next-entry
-bind pager k previous-entry
-bind pager R group-reply
+bind index,pager \Cf next-page
+bind index,pager \Cb previous-page
+bind index gg first-entry
+bind index G last-entry
+bind index i flag-message
+
+bind pager \Ce next-line
+bind pager \Cy previous-line
+bind pager j next-entry
+bind pager k previous-entry
+bind pager R group-reply
# Source mutt solarized
`[ "$COLORSCHEME" = "light" ] && echo source $HOME/.mutt/solarized/mutt-colors-solarized-light-16.muttrc || echo set`
`[ "$COLORSCHEME" = "dark" ] && echo source $HOME/.mutt/solarized/mutt-colors-solarized-dark-16.muttrc || echo set`
`[ "$COLORSCHEME" = "default" ] && echo source $HOME/.mutt/solarized/mutt-colors-solarized-dark-16.muttrc || echo set`
+
+# Hooks
+reply-hook . 'source ~/.mutt/id_gmail'
+send-hook . 'source ~/.mutt/id_gmail'
+send-hook '~t .*@imperial\.ac\.uk$' 'source ~/.mutt/id_imperial'
+reply-hook '~t .*@imperial\.ac\.uk$' 'source ~/.mutt/id_imperial'