Skip to content

Commit

Permalink
Tweaks. You know, the usual.
Browse files Browse the repository at this point in the history
  • Loading branch information
larryhynes committed Jun 22, 2015
1 parent ac2814e commit 8cbbf7d
Show file tree
Hide file tree
Showing 4 changed files with 207 additions and 120 deletions.
124 changes: 71 additions & 53 deletions .muttrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ mailboxes /Users/larry/.mail/larry/INBOX \
/Users/larry/.mail/larry/Family \
/Users/larry/.mail/larry/Archive \
/Users/larry/.mail/larry/Accounts \
/Users/larry/.mail/larry/lists \
/Users/larry/.mail/larry/logs \
/Users/larry/.mail/larry/Spam \
/Users/larry/.mail/search \
/Users/larry/.mail/larry/Drafts \
/Users/larry/.mail/larry/walking \
/Users/larry/.mail/larry/Sent\ Messages \
/Users/larry/.mail/larry/2014 \
/Users/larry/.mail/larry/2013 \
/Users/larry/.mail/larry/2012 \
/Users/larry/.mail/larry/Drafts \
/Users/larry/.mail/larry/Trash \
/Users/larry/.mail/search \
/Users/larry/.mail/larry/Sent\ Messages \

# Other special folders
set mbox="/Users/larry/.mail/larry/Archive"
Expand All @@ -41,20 +42,20 @@ set folder = ~/.mail # mailbox location
set header_cache = ~/.mutt/cache # where to store headers
unset header_cache_compress
set read_inc = 500 # Speed up mailbox listing http://www.mutt.org/doc/devel/manual.html#tuning
set mailcap_path = ~/.mutt/mailcap # entries for filetypes
set mailcap_path = ~/.mailcap # entries for filetypes
set tmpdir = ~/.mutt/temp # where to keep temp files
set signature = ~/.mutt/sig # my signature file

# Basic Options
set wait_key = no # shut up, mutt
set mbox_type = Maildir # mailbox type
set timeout = 3 # idle time before scanning
set mail_check = 0 # minimum time between scans
set mail_check = 5 # minimum time between scans
unset move # gmail does that
set delete # don't ask, just do
unset confirmappend # don't ask, just do!
set quit # don't ask, just do!!
set beep_new # bell on new mails
# set beep_new # bell on new mails
unset beep # Don't beep on errors
set pipe_decode # strip headers and eval mimes when piping
set thorough_search # strip headers and eval mimes before searching
Expand All @@ -65,10 +66,48 @@ set pipe_split
set rfc2047_parameters
set charset = "utf-8"
set send_charset = "utf-8:iso-8859-1:iso-8859-2:us-ascii"
set assumed_charset = "utf-8:iso-8859-1:iso-8859-2:us-ascii"
set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
# set maildir_trash

# Set file browser sort to reverse date i.e. newest first and set folder format for browser
# set sort_browser = reverse-date
set folder_format = "%2C %t %d %4s %f"

# View attachments properly with mailcap
bind attach <return> view-mailcap

# Address queries
# Currently using mu http://www.djcbsoftware.nl/code/mu/
set query_command="mu cfind --format=mutt-ab '%s'"
bind editor <Tab> complete-query
# set query_command = "contacts -Sf '%eTOKEN%n' '%s' | sed -e 's/TOKEN/\t/g'"

# Caleb's flow tip
# http://wcm1.web.rice.edu/mutt-tips.html
set text_flowed

# Set up some autoviews to help mailcap
auto_view text/html
auto_view text/x-vcard

# Define an order for text/html
alternative_order text/plain text/enriched text/html

# Speed up folders switch
set sleep_time = 0

# Set print options
set print_command="InputSlot=Tray1 PageSize=A4"
set print="ask-yes"
set print_split

# There may be some on-going changes here to try and mitigate 'illegal byte blah'
set locale="en_IE.UTF-8"

# set colours
# https://github.com/altercation/mutt-colors-solarized
source /Users/larry/mutt-colors-solarized/mutt-colors-solarized-dark-16.muttrc
source /Users/larry/solarized/mutt-colors-solarized/mutt-colors-solarized-dark-16.muttrc

# Index View Options
set date_format = "%d/%m %H:%M"
Expand All @@ -85,7 +124,8 @@ 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
#set mime_forward # forward attachments as part of body
# set mime_forward # forward attachments as part of body
# set mime_forward_rest
set forward_format = "Fwd: %s" # format of subject when forwarding
set forward_decode # decode when forwarding
set attribution = "[%d] %n:\\n" # format of quoting header
Expand All @@ -112,26 +152,31 @@ set status_chars = " *%A"
set status_format = "───[ %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───"

# Header Options
ignore * # ignore all headers
unignore from: to: cc: date: subject: x-mailer x-url user-agent x-pgp-key x-pgp-keyid # show only these
unhdr_order * # some distros order things by default
hdr_order from: to: cc: date: subject: x-mailer x-url user-agent x-pgp-key x-pgp-keyid # and in this order
ignore *
unignore from: to: cc: date: subject: x-mailer x-url user-agent x-pgp-key x-pgp-keyid
unhdr_order *
hdr_order from: to: cc: date: subject: x-mailer x-url user-agent x-pgp-key x-pgp-keyid
my_hdr Reply-To: larry@larryhynes.com
my_hdr X-PGP-KeyID: F9259231
my_hdr X-PGP-Key: https://larryhynes.com/larry_hynes_pubkey.asc
my_hdr X-URL: https://larryhynes.com

# Use vim to compose email
set editor="vim +11 +':set textwidth=0' +':set wrapmargin=0' +':set wrap'"
set editor="vim +11 +':set textwidth=0' +':set wrapmargin=0' +':set wrap' +':setlocal spell!'"

# Macros

# Move messages to trash, let imapfilter empty it
macro index d "s=larry/Trash\n" "move message to trash"
macro pager d "s=larry/Trash\n" "move message to trash"

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

# Sync email
macro index O "<shell-escape>offlineimap<enter>" "run offlineimap to sync all mail"
macro index o "<shell-escape>offlineimap -qf INBOX<enter>" "run offlineimap to sync inbox"
# Sync email, now with mbsync instead of offlineimap
# http://isync.sourceforge.net/mbsync.html
macro index O "<shell-escape>mbsync -aX<enter>"
macro index o "<shell-escape>mbsync -a<enter>"

# Saner copy/move dialogs
macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
Expand Down Expand Up @@ -162,43 +207,6 @@ macro index,pager \ep "<pipe-entry> sed '/^>.*/,\$\d' | paps --font='Source Sans
# http://larryhynes.net/2013/11/mutt-to-taskpaper.html
macro index,pager \Ct "<pipe-entry>~/mutt_to_taskpaper.sh<enter>"

set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"

# Set file browser sort to reverse date i.e. newest first and set folder format for browser
# set sort_browser = reverse-date
set folder_format = "%2C %t %d %4s %f"

# View attachments properly with mailcap
bind attach <return> view-mailcap

# Address queries
# Currently using mu http://www.djcbsoftware.nl/code/mu/
set query_command="mu cfind --format=mutt-ab '%s'"
bind editor <Tab> complete-query
# set query_command = "contacts -Sf '%eTOKEN%n' '%s' | sed -e 's/TOKEN/\t/g'"

# Caleb's flow tip
# http://wcm1.web.rice.edu/mutt-tips.html
set text_flowed

# View HTML mail
auto_view text/html
#
# Define an order for text/html
alternative_order text/plain text/enriched text/html


# Speed up folders switch
set sleep_time = 0

# Set print options
set print_command="lp -o media=A4"
set print="ask-yes"
set print_split

# There may be some on-going changes here to try and mitigate 'illegal byte blah'
set locale="en_IE.UTF-8"

# Settings for muttils
# https://bitbucket.org/blacktrash/muttils
#
Expand Down Expand Up @@ -245,6 +253,16 @@ pipe_decode=no wait_key=no<enter>\
# http://stackoverflow.com/questions/11287564/getting-sed-error-illegal-byte-sequence-in-bash
set display_filter="LANG=C /usr/bin/sed -f /Users/larry/.mutt/muttsed"

# SSL

set certificate_file = ~/cacert.pem
set ssl_force_tls
# set ssl_min_dh_prime_bits="2048"
set ssl_use_sslv2=no
set ssl_use_sslv3=no
set ssl_use_tlsv1=no
set ssl_use_tlsv1_1=no

# Set up scoring
source ~/.mutt/scoring

Expand Down
70 changes: 47 additions & 23 deletions .tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ set -g prefix C-a
unbind C-b
bind C-a send-prefix

# remap : to ;
unbind \;
bind \; command-prompt

# keep a larger history than default 2000 lines
set -g history-limit 5000

# start window numbers at 1 to match keyboard order with tmux window order
set -g base-index 1
set-window-option -g pane-base-index 1
Expand All @@ -24,34 +31,50 @@ bind -t vi-copy Escape cancel
bind s split-window -v
bind v split-window -h

# resize panes like vim
# feel free to change the "1" to however many lines you want to resize by, only
# one at a time can be slow
bind < resize-pane -L 10
bind > resize-pane -R 10
bind - resize-pane -D 10
bind + resize-pane -U 10

# smart pane switching with awareness of vim splits
# https://github.com/christoomey/vim-tmux-navigator
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"

# Tell tmux to use zsh
set-option -g default-command "reattach-to-user-namespace -l zsh"

# force a reload of the config file with Prefix r
# Force a reload of the config file with Prefix r
unbind r
bind r source-file ~/.tmux.conf

# smart pane switching with awareness of vim splits
# https://github.com/christoomey/vim-tmux-navigator
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"

# Some window and status stuff
# Window and status line settings
set-window-option -g automatic-rename on
set -g set-titles on
set -g set-titles-string "#W"
set -g status-bg black
set -g status-fg blue
set -g window-status-current-fg cyan
set -g status-left ""
set -g status-left "[#S]"
set -g status-right ""
set-window-option -g window-status-format " #I:#W"
set-window-option -g window-status-current-format " #I:#W"
set-window-option -g clock-mode-colour cyan
set -g status-interval 2
set-option -g renumber-windows on

# Message text https://raw.githubusercontent.com/seebi/tmux-colors-solarized/master/tmuxcolors-256.conf
set-option -g message-bg blue
set-option -g message-fg black

# disable annoying confirm dialogs
# Disable annoying confirm dialogs
bind-key & kill-window
bind-key x kill-pane

Expand All @@ -68,19 +91,20 @@ set -s escape-time 0

# Display number of new mail messages in statusbar on OSX
# https://unix.stackexchange.com/questions/49879/mutt-new-e-mail-notifications-in-tmux-window
if-shell "uname | grep Darwin" 'set -g status-right "Mail:#(~/mailcount.sh) "'

# message text https://raw.githubusercontent.com/seebi/tmux-colors-solarized/master/tmuxcolors-256.conf
set-option -g message-bg blue
set-option -g message-fg black

set-window-option -g clock-mode-colour cyan

set -g status-interval 2

set-option -g renumber-windows on
if-shell "uname | grep Darwin" 'set -g status-right "Mail: #(~/mailcount.sh) "'

# retrieve urls from current pane using muttils
# https://bitbucket.org/blacktrash/muttils
bind-key b capture-pane \; save-buffer "/Users/larry/tmp/urlpager-tmux.capture" \; \
split-window 'urlpager "/Users/larry/tmp/urlpager-tmux.capture" && rm -f "/Users/larry/tmp/urlpager-tmux.capture"'

# Following are taken from the zsh examples in /usr/local/share/tmux/examples
bind < resize-pane -L 10
bind > resize-pane -R 10
bind - resize-pane -D 10
bind + resize-pane -U 10

# Settings for tmux-resurrect
# https://github.com/tmux-plugins/tmux-resurrect
if-shell "uname | grep Darwin" 'run-shell ~/tmux-resurrect/resurrect.tmux'
set -g @resurrect-processes 'mutt vim ssh autossh'
Loading

0 comments on commit 8cbbf7d

Please sign in to comment.