Starting to get my mutt on

Thinking I will need to port jellybeans to mutt, other than that gmail is all
set up utilizing the Keychain item.
This commit is contained in:
Joshua Sherman 2014-01-26 23:02:41 -05:00
parent 40b9b7031f
commit 84afbdf863
2 changed files with 54 additions and 1 deletions

53
mutt/muttrc Normal file
View file

@ -0,0 +1,53 @@
# A basic .muttrc for use with Gmail
# Change the following six lines to match your Gmail account details
set imap_user = `security find-generic-password -s @gmail.com | grep 'acct' | cut -c 19- | tr -d '"' | tr -d '\n'`
set imap_pass = `security find-generic-password -s @gmail.com -w`
set smtp_url = "smtp://YOUR.EMAIL@smtp.gmail.com:587/"
set smtp_pass = `security find-generic-password -w -s ${KEYCHAIN_ITEM}`
set from = `security find-generic-password -s ${KEYCHAIN_ITEM} | grep 'acct' | cut -c 19- | tr -d '"' | tr -d '\n'`
set realname = "Joshua Sherman"
# Change the following line to a different editor you prefer.
set editor = "mvim -v"
# Basic config, you can leave this as is
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set imap_check_subscribed
set hostname = gmail.com
set mail_check = 120
set timeout = 300
set imap_keepalive = 300
set postponed = "+[GMail]/Drafts"
set record = "+[GMail]/Sent Mail"
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates
set move = no
set include
set sort = 'threads'
set sort_aux = 'reverse-last-date-received'
set auto_tag = yes
ignore "Authentication-Results:"
ignore "DomainKey-Signature:"
ignore "DKIM-Signature:"
hdr_order Date From To Cc
alternative_order text/plain text/html *
auto_view text/html
bind editor <Tab> complete-query
bind editor ^T complete
bind editor <space> noop
# Gmail-style keyboard shortcuts
macro index,pager y "<enter-command>unset trash\n <delete-message>" "Gmail archive message"
macro index,pager d "<enter-command>set trash=\"imaps://imap.googlemail.com/[GMail]/Bin\"\n <delete-message>" "Gmail delete message"
macro index,pager gi "<change-folder>=INBOX<enter>" "Go to inbox"
macro index,pager ga "<change-folder>=[Gmail]/All Mail<enter>" "Go to all mail"
macro index,pager gs "<change-folder>=[Gmail]/Starred<enter>" "Go to starred messages"
macro index,pager gd "<change-folder>=[Gmail]/Drafts<enter>" "Go to drafts"
source ./mutt-colors-solarized/mutt-colors-solarized-dark-16.muttrc
source ./mutt-colors-solarized/mutt-colors-solarized-light-16.muttrc
source ./mutt-colors-solarized/mutt-colors-solarized-dark-256.muttrc
source ./mutt-colors-solarized/mutt-colors-solarized-light-256.muttrc

View file

@ -1,2 +1,2 @@
#!/bin/bash
export KEYCHAIN_ITEM='email-gmail' && curl -u `security find-generic-password -s ${KEYCHAIN_ITEM} | grep 'acct' | cut -c 19- | tr -d '"' | tr -d '\n'`:`security find-generic-password -w -s ${KEYCHAIN_ITEM}` --silent "https://mail.google.com/mail/feed/atom" | perl -ne 'print "$2\n" if /<(email)>(.*)<\/\1>/;' | wc -l | tr -d ' ' > /tmp/UNREAD_GMAIL > /tmp/UNREAD_GMAIL
export KEYCHAIN_ITEM='@gmail.com' && curl -u `security find-generic-password -s ${KEYCHAIN_ITEM} | grep 'acct' | cut -c 19- | tr -d '"' | tr -d '\n'`:`security find-generic-password -w -s ${KEYCHAIN_ITEM}` --silent "https://mail.google.com/mail/feed/atom" | perl -ne 'print "$2\n" if /<(email)>(.*)<\/\1>/;' | wc -l | tr -d ' ' > /tmp/UNREAD_GMAIL > /tmp/UNREAD_GMAIL