summaryrefslogtreecommitdiffstats
path: root/.mutt
diff options
context:
space:
mode:
Diffstat (limited to '.mutt')
-rw-r--r--.mutt/.signature2
-rw-r--r--.mutt/aliases1
-rw-r--r--.mutt/colors23
-rw-r--r--.mutt/gpg.rc114
-rw-r--r--.mutt/mailcap1
-rw-r--r--.mutt/muttrc45
6 files changed, 170 insertions, 16 deletions
diff --git a/.mutt/.signature b/.mutt/.signature
new file mode 100644
index 0000000..26a75e2
--- /dev/null
+++ b/.mutt/.signature
@@ -0,0 +1,2 @@
+Sadeep Madurange
+PGP: 103BF9E3E750BF7E
diff --git a/.mutt/aliases b/.mutt/aliases
new file mode 100644
index 0000000..56fa98c
--- /dev/null
+++ b/.mutt/aliases
@@ -0,0 +1 @@
+alias mutt-users <mutt-users@mutt.org>
diff --git a/.mutt/colors b/.mutt/colors
new file mode 100644
index 0000000..843f753
--- /dev/null
+++ b/.mutt/colors
@@ -0,0 +1,23 @@
+# -*-muttrc-*-
+
+# Palette for use with the Linux console. Black background.
+
+color hdrdefault default default
+color quoted default default
+color signature default default
+color attachment default default
+color prompt default default
+color message default default
+color error default default
+color indicator reverse default default
+color status reverse default default
+color tree default default
+color normal default default
+color markers default default
+color search default default
+color tilde default default
+color index default default ~F
+color index default default "~N|~O"
+
+# color body brightwhite black '\*+[^*]+\*+'
+# color body brightwhite black '_+[^_]+_+'
diff --git a/.mutt/gpg.rc b/.mutt/gpg.rc
new file mode 100644
index 0000000..d773c15
--- /dev/null
+++ b/.mutt/gpg.rc
@@ -0,0 +1,114 @@
+# -*-muttrc-*-
+#
+# Command formats for gpg.
+#
+# Some of the older commented-out versions of the commands use gpg-2comp from:
+# http://70t.de/download/gpg-2comp.tar.gz
+#
+# %p The empty string when no passphrase is needed,
+# the string "PGPPASSFD=0" if one is needed.
+#
+# This is mostly used in conditional % sequences.
+#
+# %f Most PGP commands operate on a single file or a file
+# containing a message. %f expands to this file's name.
+#
+# %s When verifying signatures, there is another temporary file
+# containing the detached signature. %s expands to this
+# file's name.
+#
+# %a In "signing" contexts, this expands to the value of the
+# configuration variable $pgp_sign_as, if set, otherwise
+# $pgp_default_key. You probably need to
+# use this within a conditional % sequence.
+#
+# %r In many contexts, mutt passes key IDs to pgp. %r expands to
+# a list of key IDs.
+
+
+# Section A: Key Management
+
+# The default key for encryption (used by $pgp_self_encrypt and
+# $postpone_encrypt).
+#
+# It will also be used for signing unless $pgp_sign_as is set to a
+# key.
+#
+# Unless your key does not have encryption capability, uncomment this
+# line and replace the keyid with your own.
+#
+# set pgp_default_key="0x12345678"
+
+# If you have a separate signing key, or your key _only_ has signing
+# capability, uncomment this line and replace the keyid with your
+# signing keyid.
+#
+# set pgp_sign_as="0x87654321"
+
+
+# Section B: Commands
+
+# Note that we explicitly set the comment armor header since GnuPG, when used
+# in some localiaztion environments, generates 8bit data in that header, thereby
+# breaking PGP/MIME.
+
+# decode application/pgp
+set pgp_decode_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
+
+# verify a pgp/mime signature
+set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f"
+
+# decrypt a pgp/mime attachment
+set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
+
+# create a pgp/mime signed attachment
+# set pgp_sign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
+set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
+
+# create a application/pgp signed (old-style) message
+# set pgp_clearsign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
+set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
+
+# create a pgp/mime encrypted attachment
+# set pgp_encrypt_only_command="pgpewrap gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
+set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
+
+# create a pgp/mime encrypted and signed attachment
+# set pgp_encrypt_sign_command="pgpewrap gpg-2comp %?p?--passphrase-fd 0? -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
+set pgp_encrypt_sign_command="pgpewrap gpg %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
+
+# import a key into the public key ring
+set pgp_import_command="gpg --no-verbose --import %f"
+
+# export a key from the public key ring
+set pgp_export_command="gpg --no-verbose --export --armor %r"
+
+# verify a key
+set pgp_verify_key_command="gpg --verbose --batch --fingerprint --check-sigs %r"
+
+# read in the public key ring
+# note: the second --with-fingerprint adds fingerprints to subkeys
+set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --with-fingerprint --with-fingerprint --list-keys %r"
+
+# read in the secret key ring
+# note: the second --with-fingerprint adds fingerprints to subkeys
+set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --with-fingerprint --with-fingerprint --list-secret-keys %r"
+
+# fetch keys
+# set pgp_getkeys_command="pkspxycwrap %r"
+
+# pattern for good signature - may need to be adapted to locale!
+
+# set pgp_good_sign="^gpgv?: Good signature from "
+
+# OK, here's a version which uses gnupg's message catalog:
+# set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`"
+
+# This version uses --status-fd messages
+set pgp_good_sign="^\\[GNUPG:\\] GOODSIG"
+
+# pattern to verify a decryption occurred
+# This is now deprecated by pgp_check_gpg_decrypt_status_fd:
+# set pgp_decryption_okay="^\\[GNUPG:\\] DECRYPTION_OKAY"
+set pgp_check_gpg_decrypt_status_fd
+
diff --git a/.mutt/mailcap b/.mutt/mailcap
new file mode 100644
index 0000000..f93be9a
--- /dev/null
+++ b/.mutt/mailcap
@@ -0,0 +1 @@
+text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -collapse_br_tags -dump %s; nametemplate=%s.html; copiousoutput
diff --git a/.mutt/muttrc b/.mutt/muttrc
index 73ea791..e519500 100644
--- a/.mutt/muttrc
+++ b/.mutt/muttrc
@@ -1,3 +1,6 @@
+unset markers
+set editor="vim +':set tw=72'"
+
# imap settings
set timeout=15
set sleep_time=0
@@ -7,21 +10,30 @@ set header_cache=~/.cache/mutt
set message_cachedir=~/.cache/mutt
set imap_check_subscribed=yes
set imap_list_subscribed=yes
-set imap_user=***
-set imap_pass=`pass show ***`
-set folder=imaps://outlook.office365.com:993
-set from=***
+set imap_user=sadeep@example.com
+set imap_pass=`pass show mail`
+set folder=imaps://imap.example.com:993
+set from=sadeep@example.com
set realname="Sadeep Madurange"
unset imap_passive
# smtp settings
-set smtp_url=smtp://$imap_user:$imap_pass@smtp.office365.com:587
+set smtp_pass=$imap_pass
+set smtp_url=smtp://$imap_user@smtp.example.com:587
set ssl_force_tls=yes
unset ssl_starttls
# signature
set signature="~/.mutt/.signature"
+# aliases
+set alias_file = "~/.mutt/aliases"
+set sort_alias = alias
+source $alias_file
+
+# colours
+source ~/.mutt/colors
+
# html
set mailcap_path=~/.mutt/mailcap
auto_view text/html
@@ -30,16 +42,18 @@ macro attach 'V' "<pipe-entry>iconv -c --to-code=UTF8 > ~/.cache/mutt/mail.html<
# mailboxes
set spoolfile=+INBOX
-mailboxes = +INBOX
+mailboxes +INBOX
set record=+Sent
set postponed=+Drafts
+set trash=+Trash
# index
-set sidebar_width=20
+set sidebar_width=12
set sidebar_visible=yes
set sort=reverse-date
set date_format="%Y-%m-%d %T"
-set index_format="%2C | %S [%D] %-30.30F %s"
+set index_format="%2C | %S [%D] %-30.30F %-55.50s %6c"
+set mark_old=no
# key bindings
# https://ryanlue.com/posts/2017-05-21-mutt-the-vim-way
@@ -50,21 +64,22 @@ bind generic s noop
bind generic c noop
bind generic t noop
-bind generic,index,pager \Cw next-page
-bind generic,index,pager \Cb previous-page
+bind generic,index,pager J next-page
+bind generic,index,pager K previous-page
+bind pager j next-line
+bind pager k previous-line
bind generic gg first-entry
bind generic G last-entry
bind pager gg top
bind pager G bottom
-bind pager,index N search-opposite
bind index,pager R group-reply
+bind index,pager B sidebar-toggle-visible
macro index,pager gi "<change-folder>=INBOX<enter>" "open inbox"
macro index,pager gd "<change-folder>=Drafts<enter>" "open drafts"
macro index,pager gs "<change-folder>=Sent<enter>" "open sent"
-macro index,pager go "<change-folder>=Outbox<enter>" "open outbox"
-macro index,pager gj "<change-folder>=Junk<enter>" "open junk"
-macro index,pager gt "<change-folder>$trash<enter>" "open trash"
+macro index,pager gj "<change-folder>=Spam<enter>" "open junk"
+macro index,pager gt "<change-folder>=Trash<enter>" "open trash"
macro index,pager gf "<change-folder>?" "open mailbox..."
macro index,pager dd "<delete-message><sync-mailbox>" "move message to trash"
@@ -72,5 +87,3 @@ macro index,pager dt "<delete-thread><sync-mailbox>"
# encryption
source ~/.mutt/gpg.rc
-
-unset markers