ambevar-dotfiles/.muttrc

214 lines
7.1 KiB
Plaintext
Raw Normal View History

## -*- mode:sh -*- #
################################################################################
## Mutt Configuration
## Date 2013-03-02
################################################################################
## Note on folders:
## These folders are assumed to exist:
## ~/.mutt: personal stuff (contacts, account information)
## ~/.mutt.d: public stuff (theme, mailcap)
##------------------------------------------------------------------------------
## General options
##------------------------------------------------------------------------------
2013-03-02 16:53:37 +01:00
## Beep on new incoming mails.
set beep_new = "yes"
## Headers are editable in editor.
set edit_headers=yes
## Seems like $EDITOR is internal to Mutt, whereas variable set between
## backquotes are external. By default Mutt will use env EDITOR variable, so we
## do not really need to set it.
# set editor=`echo \$EDITOR`
# set editor="emacsclient -a \"\" -t"
2013-03-02 16:53:37 +01:00
## Store message headers locally to speed things up. Gentoo wiki says that if a
## folder is specified, it is even faster. If no folder exists, the cache will
## be a single file.
set header_cache = "~/.cache/mutt"
2013-03-02 16:53:37 +01:00
## Tell Mutt to check all IMAP folders. This will add all of them to the
## sidebar. Contrary to the manu 'mailboxes' way, order cannot be controlled, so
## you should set 'sidebar_sort' to yes. This will sort the folders
## alphabetically, ignoring punctuation.
set imap_check_subscribed
## Keep imap connection alive by polling intermittently (time in seconds).
set imap_keepalive = 300
2013-03-02 16:53:37 +01:00
## Allow mutt to open new imap connection automatically.
unset imap_passive
2013-03-02 16:53:37 +01:00
## Mailcap
set mailcap_path = ~/.mutt.d/mailcap
auto_view text/html
alternative_order text/plain text/html
2013-03-02 16:53:37 +01:00
## How often to check for new mail (time in seconds).
set mail_check = 60
## Mailbox type.
set mbox_type=Maildir
## Encoding
set send_charset="us-ascii:utf-8"
2013-03-02 16:53:37 +01:00
## Remove delay between mailbox switches.
set sleep_time = 0
##------------------------------------------------------------------------------
## Multiple accounts
##------------------------------------------------------------------------------
set my_ac_personal=personal
set my_ac_work=work
set my_ac_university=university
## Login
## Store passwords as follows in .mutt-pwds:
## set my_pw_account = foo
##
## CCRYPT:
## ccencrypt .mutt-pwds
##
## GNUPG: Generate a key pair with:
## gpg2 --gen-key
## Encrypt them with:
## gpg2 -e -r <user> ".mutt-pwds"
source "ccat ~/.mutt-pwds.cpt |"
# source "gpg2 -dq ~/.mutt-pwds.gpg |"
## Last account is default.
source "~/.mutt/$my_ac_work"
folder-hook $folder 'source ~/.mutt/$my_ac_work'
2013-03-02 16:53:37 +01:00
source "~/.mutt/$my_ac_personal"
folder-hook $folder 'source ~/.mutt/$my_ac_personal'
source "~/.mutt/$my_ac_university"
folder-hook $folder 'source ~/.mutt/$my_ac_university'
macro index,pager <f2> '<enter-command>source ~/.mutt/$my_ac_work<enter><change-folder>!<enter>'
macro index,pager <f3> '<enter-command>source ~/.mutt/$my_ac_personal<enter><change-folder>!<enter>'
macro index,pager <f4> '<enter-command>source ~/.mutt/$my_ac_university<enter><change-folder>!<enter>'
##------------------------------------------------------------------------------
## Sidebar
##------------------------------------------------------------------------------
set sidebar_visible = yes
2013-03-02 15:13:42 +01:00
set sidebar_width = 24
set sidebar_shortpath = yes
2013-03-02 16:53:37 +01:00
set sidebar_sort = yes
2013-03-02 15:13:42 +01:00
set sidebar_delim=' '
2013-03-02 16:53:37 +01:00
# set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%4S"
# set sidebar_folderindent = yes
2013-03-02 15:13:42 +01:00
## Color of folders with new mail
color sidebar_new yellow default
2013-03-02 15:13:42 +01:00
## Ctrl-n, Ctrl-p to select next, previous folder.
## Ctrl-o to open selected folder
bind index,pager \CP sidebar-prev
bind index,pager \CN sidebar-next
bind index,pager \CO sidebar-open
## Toggle sidebar visibility
# macro index b '<enter-command>toggle sidebar_visible<enter>'
# macro pager b '<enter-command>toggle sidebar_visible<enter>'
## Prevent messy output
macro index b '<enter-command>toggle sidebar_visible<enter><refresh>'
macro pager b '<enter-command>toggle sidebar_visible<enter><redraw-screen>'
##------------------------------------------------------------------------------
## Aliases
##------------------------------------------------------------------------------
## Mutt native support
# set alias_file = "~/.mutt/aliases"
# set sort_alias = alias
# set reverse_alias = yes
# source $alias_file
## Abook
set query_command= "abook --mutt-query '%s'"
macro index,pager a "<pipe-message>abook --add-email-quiet<return>" "Add this sender to Abook"
bind editor <Tab> complete-query
##------------------------------------------------------------------------------
## Keys
##------------------------------------------------------------------------------
2013-03-02 16:53:37 +01:00
## Security issue: if enter-command is available from the GUI, it is possible to
## see the password unencrypted. We disable it for this reason. Every command
## that the user intends to use must be bound to a key in advance, otherwise it
## will never be accessible.
bind index,pager ':' noop
## Remap bounce-message function to "B"
bind index B bounce-message
## Fix the 'change-dir' issue with multiple accounts. When change-dir was called
## with account A, then use switched to account B, change-dir will still point
## to account A by default.
2013-03-04 17:31:57 +01:00
# macro index 'c' '<change-folder>?<change-dir><home>^K=<enter>'
## Manual fetch.
bind index "^" imap-fetch-mail
## Fix the backspace wrong binding that happens on some terminals.
#bind index,pager  previous-page
## Fix Backspace -- Shell alternative.
2013-03-02 16:53:37 +01:00
## $ infocmp > termbs.src
## Changed kbs=^H to kbs=\177, then:
2013-03-02 16:53:37 +01:00
## $ tic -x termbs.src
##------------------------------------------------------------------------------
## Custom headers for outgoing mail
##------------------------------------------------------------------------------
## Undo any custom headers that may have been put in by the global Muttrc
# unmy_hdr *
2013-03-02 16:53:37 +01:00
## Remove any global 'From:' header
# unset use_from
## Don't append a domain to my outgoing mails
2013-03-02 16:53:37 +01:00
# unset use_domain
# my_hdr From: Firstname Lastname <myfirstname@mymailserver>
## Extra info.
my_hdr X-Info: Simplicity is the ultimate sophistication.
## OS Info.
# my_hdr X-Operating-System: `uname -s`, kernel `uname -r`
## This header only appears to MS Outlook users
2013-03-02 16:53:37 +01:00
# my_hdr X-Message-Flag: WARNING!! Outlook sucks!
## Custom Mail-User-Agent ID.
set user_agent = yes
# my_hdr User-Agent: Every email client sucks, this one just sucks less.
##------------------------------------------------------------------------------
## Themes
##------------------------------------------------------------------------------
## TODO: Use these variables to get dynamic column size.
# set my_col_from = `echo $((30 * ($COLUMNS-34) / 100))`
# set my_col_subject = `echo $((70 * ($COLUMNS-34) / 100))`
## Index format
## See 'man 3 strftime' and 'man 3 printf'.
# set index_format="%?M?_%M_ ?%Z %2C %.13d (%-68.68F) %-68.68s %?M?_%M_&(%c/%l?"
set date_format="%y-%m-%d %T"
set index_format="%2C | %Z [%d] %-30.30F (%-4.4c) %s"
## Colors
source "~/.mutt.d/colorset.sh|"
source "~/.mutt.d/colors.ambrevar"
2013-03-02 16:53:37 +01:00
# source "/usr/share/doc/mutt/samples/colors.default"
# source "/usr/share/doc/mutt/samples/colors.linux"