diff --git a/i3/.config/i3/config.thinkpad b/i3/.config/i3/config.thinkpad index b88ff35..69e97d6 100644 --- a/i3/.config/i3/config.thinkpad +++ b/i3/.config/i3/config.thinkpad @@ -47,6 +47,7 @@ assign [class="Google-chrome"] $workspace2 assign [class="Firefox"] $workspace2 assign [class="Gpodder"] $workspace4 assign [class="ncmpcpp"] $workspace4 +assign [class="mutt"] $workspace6 assign [class="Slack"] $workspace7 assign [class="weechat"] $workspace7 assign [class="retroarch"] $workspace8 @@ -124,6 +125,7 @@ exec firefox exec slack exec i3-sensible-terminal --class=weechat -e weechat exec i3-sensible-terminal --class=ncmpcpp -e ncmpcpp +exec i3-sensible-terminal --class=mutt -e mutt exec gpodder # Start dropdown shell diff --git a/mutt/.mutt/account.com.gmail.alrayyes b/mutt/.mutt/account.com.gmail.alrayyes index 66eab22..7772bc2 100644 --- a/mutt/.mutt/account.com.gmail.alrayyes +++ b/mutt/.mutt/account.com.gmail.alrayyes @@ -1,4 +1,9 @@ -set folder = "~/mail" set spoolfile = "+gmail/inbox" set record = "+gmail/Sent\ Items" set postponed = "+gmail/Drafts" + +set from = "alrayyes@gmail.com" +set sendmail = "msmtp -a gmail" +set sendmail_wait = 0 +unset record +set realname = "Ryan" diff --git a/mutt/.mutt/account.nl.andthensome.ryan b/mutt/.mutt/account.nl.andthensome.ryan index f237250..dbc478f 100644 --- a/mutt/.mutt/account.nl.andthensome.ryan +++ b/mutt/.mutt/account.nl.andthensome.ryan @@ -1,4 +1,9 @@ -set folder = "~/mail" set spoolfile = "+andthensome/inbox" set record = "+andthensome/Sent\ Items" set postponed = "+andthensome/Drafts" + +set from = "ryan@andthensome.nl" +set sendmail = "msmtp -a andthensome" +set sendmail_wait = 0 +unset record +set realname = "Ryan Kes" diff --git a/mutt/.mutt/gpg.rc b/mutt/.mutt/gpg.rc new file mode 100644 index 0000000..3392038 --- /dev/null +++ b/mutt/.mutt/gpg.rc @@ -0,0 +1,86 @@ +# -*-muttrc-*- +# +# Command formats for gpg. +# +# This version uses 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. 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. + +# 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 +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 +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 +set pgp_decryption_okay="^\\[GNUPG:\\] DECRYPTION_OKAY" + diff --git a/mutt/.mutt/muttrc b/mutt/.mutt/muttrc new file mode 100644 index 0000000..5df3770 --- /dev/null +++ b/mutt/.mutt/muttrc @@ -0,0 +1,148 @@ +# Paths +set folder = ~/mail +set header_cache = ~/.mutt/cache/headers +set message_cachedir = ~/.mutt/cache/bodies +set mailcap_path = ~/.mailcap +set tmpdir = ~/.mutt/temp +set signature = ~/.mutt/sig + +# Basic options +set wait_key = no +set mbox_type = Maildir +set timeout = 3 +set mail_check = 0 +set move = no +set delete +set confirmappend = no +set quit +set beep_new +set pipe_decode +set thorough_search + +# Index view options +set sort = threads +set sort_aux = reverse-last-date-received +set date_format="%d/%m %I:%M" +set index_format="[%Z] %D %-20.20F %s" +set uncollapse_jump + +# pgp stuff +set pgp_replyencrypt # now crypt_replyencrypt +set pgp_replysign # now crypt_replysign +set pgp_replysignencrypted # now crypt_replysignencrypted +set pgp_show_unusable=no + +# Pager View Options --------------------------------- +set pager_index_lines = 10 # number of index lines to show +set pager_context = 3 # number of context lines to show +set pager_stop # don't go to next message automatically +set menu_scroll # scroll in menus +set tilde # show tildes like in vim +unset markers # no ugly plus signs + +set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" +alternative_order text/plain text/enriched text/html + +# Sidebar +set sidebar_visible +set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S" +set mail_check_stats +set sidebar_short_path +set sidebar_delim_chars="/" +set sidebar_new_mail_only +set sidebar_width = 24 + +# Compose View Options ------------------------------- +set envelope_from # which from? +set sig_dashes # dashes before sig +set edit_headers # show headers when composing +set fast_reply # skip to compose when replying +set askcc # ask for CC: +set fcc_attach # save attachments with the body +unset mime_forward # forward attachments as part of body +set forward_format = "Fwd: %s" # format of subject when forwarding +set forward_decode # decode when forwarding +set attribution = "On %d, %n wrote:" # format of quoting header +set reply_to # reply to Reply to: field +set reverse_name # reply as whomever it was to +set include # include message in replies +set forward_quote # include message in forwards +set editor = vim + +# Index Key Bindings --------------------------------- +bind index g noop +bind index gg first-entry +bind index G last-entry +bind index R group-reply +bind index sync-mailbox +bind index collapse-thread + +# Pager bindings +bind pager g noop +bind pager k previous-line +bind pager j next-line +bind pager gg top +bind pager G bottom +bind pager R group-reply + +# Sidebar Navigation --------------------------------- +bind index,pager sidebar-next +bind index,pager sidebar-prev +bind index,pager sidebar-open +bind index,pager B sidebar-toggle-visible + +# Attachments and editor +bind attach view-mailcap +bind editor noop + +# Ctrl-R to mark all as read +macro index \Cr "T~UN." "mark all messages as read" + +# Saner copy/move dialogs +macro index C "?" "copy a message to a mailbox" +macro index M "?" "move a message to a mailbox" + +# Switch between mailboxes +macro index 'source ~/.mutt/account.com.gmail.alrayyes!' +macro index 'source ~/.mutt/account.nl.andthensome.ryan!' + +# Sync email +macro index O "offlineimap -o " "run offlineimap to sync all mail" +macro index o "offlineimap -o -qf INBOX" "run offlineimap to sync inbox" + +# Open links with urlview +macro pager \Cu "|urlview" + +# Header Options ------------------------------------- +ignore * # ignore all headers +unignore from: to: cc: date: subject: # show only these +unhdr_order * # some distros order things by default +hdr_order from: to: cc: date: subject: # and in this order + +# layout +mono bold bold +mono underline underline +mono indicator reverse +color index yellow default '.*' +color index_author red default '.*' +color index_number blue default +color index_subject cyan default '.s' +color index_size green default +color normal default default +color body brightred default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+ +color body brightblue default (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+ +color sidebar_new color221 color233 + +# Goobook +set query_command="goobook query %s" +macro index,pager a "goobook add" "add sender to google contacts" +bind editor complete-query + +# Notmuch +#set virtual_spoolfile=yes +#source ~/.mutt/notmuchmailboxes + +source ~/.mutt/mailboxes +source ~/.mutt/account.com.gmail.alrayyes +source ~/.mutt/muttcol +source ~/.mutt/gpg.rc diff --git a/mutt/.muttrc b/mutt/.muttrc deleted file mode 100644 index f3b2270..0000000 --- a/mutt/.muttrc +++ /dev/null @@ -1,37 +0,0 @@ -source ~/.mutt/mailboxes -source ~/.mutt/account.com.gmail.alrayyes -source ~/.mutt/muttcol - -set sort = 'reverse-date' -set move = no -set imap_keepalive = 900 -set date_format="%m/%d %I:%M" -set index_format="%2C %Z %d %-15.15F %s (%-4.4c)" - -# pgp stuff -set pgp_replyencrypt # now crypt_replyencrypt -set pgp_replysign # now crypt_replysign -set pgp_replysignencrypted # now crypt_replysignencrypted -set pgp_show_unusable=no - -macro index 'source ~/.mutt/account.com.gmail.alrayyes!' -macro index 'source ~/.mutt/account.nl.andthensome.ryan!' - -mono bold bold -mono underline underline -mono indicator reverse -color index yellow default '.*' -color index_author red default '.*' -color index_number blue default -color index_subject cyan default '.s' -color index_size green default -color normal default default -color body brightred default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+ -color body brightblue default (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+ - -bind editor noop - -# Goobook -set query_command="goobook query %s" -macro index,pager a "goobook add" "add sender to google contacts" -bind editor complete-query diff --git a/notmuch/.notmuch-config b/mutt/.notmuch-config similarity index 99% rename from notmuch/.notmuch-config rename to mutt/.notmuch-config index d71f9f7..6855bb1 100644 --- a/notmuch/.notmuch-config +++ b/mutt/.notmuch-config @@ -96,3 +96,6 @@ synchronize_flags=true # [crypto] gpg_path=gpg + +[new] +tags=new diff --git a/mutt/bin/notmuch-hook.sh b/mutt/bin/notmuch-hook.sh new file mode 100755 index 0000000..d01ba2d --- /dev/null +++ b/mutt/bin/notmuch-hook.sh @@ -0,0 +1,4 @@ +#!/bin/sh +notmuch new +notmuch tag +inbox -new -- tag:new +notmuch tag -new -inbox +sent -- from:alrayyes@gmail.com or from:ryan@andthensome.nl diff --git a/vim/.vimrc.local b/vim/.vimrc.local index ca4e407..17e883a 100644 --- a/vim/.vimrc.local +++ b/vim/.vimrc.local @@ -2,3 +2,6 @@ color molokai " vim-devicons set encoding=utf8 + +" mutt +au BufRead ~/.mutt/temp/mutt-* set tw=72