1
0
mirror of https://github.com/alrayyes/server-dotfiles synced 2023-11-14 15:56:25 +00:00

mutt config how i want it....for now. Still havent setup notmuch properly, but screw it

This commit is contained in:
Ryan 2017-08-08 22:38:51 +02:00
parent b1121178e2
commit 42208451c7
9 changed files with 258 additions and 39 deletions

View File

@ -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

View File

@ -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"

View File

@ -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"

86
mutt/.mutt/gpg.rc Normal file
View File

@ -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"

148
mutt/.mutt/muttrc Normal file
View File

@ -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 <tab> sync-mailbox
bind index <space> 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 <down> sidebar-next
bind index,pager <up> sidebar-prev
bind index,pager <right> sidebar-open
bind index,pager B sidebar-toggle-visible
# Attachments and editor
bind attach <return> view-mailcap
bind editor <space> noop
# Ctrl-R to mark all as read
macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
# Saner copy/move dialogs
macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
# Switch between mailboxes
macro index <f1> '<sync-mailbox><enter-command>source ~/.mutt/account.com.gmail.alrayyes<enter><change-folder>!<enter>'
macro index <f2> '<sync-mailbox><enter-command>source ~/.mutt/account.nl.andthensome.ryan<enter><change-folder>!<enter>'
# Sync email
macro index O "<shell-escape>offlineimap -o <enter>" "run offlineimap to sync all mail"
macro index o "<shell-escape>offlineimap -o -qf INBOX<enter>" "run offlineimap to sync inbox"
# Open links with urlview
macro pager \Cu "|urlview<enter>"
# 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 "<pipe-message>goobook add<return>" "add sender to google contacts"
bind editor <Tab> 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

View File

@ -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 <f1> '<sync-mailbox><enter-command>source ~/.mutt/account.com.gmail.alrayyes<enter><change-folder>!<enter>'
macro index <f2> '<sync-mailbox><enter-command>source ~/.mutt/account.nl.andthensome.ryan<enter><change-folder>!<enter>'
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 <space> noop
# Goobook
set query_command="goobook query %s"
macro index,pager a "<pipe-message>goobook add<return>" "add sender to google contacts"
bind editor <Tab> complete-query

View File

@ -96,3 +96,6 @@ synchronize_flags=true
#
[crypto]
gpg_path=gpg
[new]
tags=new

4
mutt/bin/notmuch-hook.sh Executable file
View File

@ -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

View File

@ -2,3 +2,6 @@ color molokai
" vim-devicons
set encoding=utf8
" mutt
au BufRead ~/.mutt/temp/mutt-* set tw=72