Mutt: sidebar configuration and better multiple account support.
parent
5cfc12db03
commit
cd1e2e6a12
79
.muttrc
79
.muttrc
|
@ -1,22 +1,22 @@
|
||||||
## -*- mode:sh -*- #
|
## -*- mode:sh -*- #
|
||||||
################################################################################
|
################################################################################
|
||||||
## Mutt Configuration
|
## Mutt Configuration
|
||||||
## Date 2013-01-09
|
## Date 2013-03-02
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
## Note on folders:
|
## Note on folders:
|
||||||
## These folders are assumed to exist:
|
## These folders are assumed to exist:
|
||||||
## ~/.mutt: personal stuff (contacts, account information)
|
## ~/.mutt: personal stuff (contacts, account information)
|
||||||
## ~/.mutt.d: public stuff (cache, theme, mailcap)
|
## ~/.mutt.d: public stuff (theme, mailcap)
|
||||||
## ~/.mutt.d/hcache: see header_cache below.
|
## ~/.mutt.d/hcache: see header_cache below.
|
||||||
|
|
||||||
##-------------------------------------------------------------------------------
|
##------------------------------------------------------------------------------
|
||||||
## General options
|
## General options
|
||||||
##-------------------------------------------------------------------------------
|
##------------------------------------------------------------------------------
|
||||||
|
|
||||||
## Seems like $EDITOR is internal to Mutt, whereas variable set between
|
## Seems like $EDITOR is internal to Mutt, whereas variable set between
|
||||||
## backquotes are external. Mutt will use env EDITOR variable, so we do not
|
## backquotes are external. By default Mutt will use env EDITOR variable, so we
|
||||||
## really need to set it.
|
## do not really need to set it.
|
||||||
# set editor=`echo \$EDITOR`
|
# set editor=`echo \$EDITOR`
|
||||||
# set editor="emacsclient -a \"\" -t"
|
# set editor="emacsclient -a \"\" -t"
|
||||||
|
|
||||||
|
@ -54,9 +54,15 @@ set edit_headers=yes
|
||||||
## Encoding
|
## Encoding
|
||||||
set send_charset="us-ascii:utf-8"
|
set send_charset="us-ascii:utf-8"
|
||||||
|
|
||||||
##-------------------------------------------------------------------------------
|
## 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
|
||||||
|
|
||||||
|
##------------------------------------------------------------------------------
|
||||||
## Multiple accounts
|
## Multiple accounts
|
||||||
##-------------------------------------------------------------------------------
|
##------------------------------------------------------------------------------
|
||||||
|
|
||||||
set my_ac_personal=personal
|
set my_ac_personal=personal
|
||||||
set my_ac_work=work
|
set my_ac_work=work
|
||||||
|
@ -66,30 +72,51 @@ set my_ac_university=university
|
||||||
## Store passwords as follows in .mutt-pwds:
|
## Store passwords as follows in .mutt-pwds:
|
||||||
## set my_pw_account = foo
|
## set my_pw_account = foo
|
||||||
##
|
##
|
||||||
|
## CCRYPT:
|
||||||
|
## ccencrypt .mutt-pwds
|
||||||
|
##
|
||||||
## GNUPG: Generate a key pair with:
|
## GNUPG: Generate a key pair with:
|
||||||
## gpg2 --gen-key
|
## gpg2 --gen-key
|
||||||
## Encrypt them with:
|
## Encrypt them with:
|
||||||
## gpg2 -e -r <user> ".mutt-pwds"
|
## gpg2 -e -r <user> ".mutt-pwds"
|
||||||
##
|
|
||||||
## CCRYPT:
|
|
||||||
## ccencrypt .mutt-pwds
|
|
||||||
source "ccat ~/.mutt-pwds.cpt |"
|
source "ccat ~/.mutt-pwds.cpt |"
|
||||||
# source "gpg2 -dq ~/.mutt-pwds.gpg |"
|
# source "gpg2 -dq ~/.mutt-pwds.gpg |"
|
||||||
|
|
||||||
## Accounts list
|
## Last account is default.
|
||||||
folder-hook '$my_ac_personal' 'source ~/.mutt/$my_ac_personal'
|
source "~/.mutt/$my_ac_personal"
|
||||||
folder-hook '$my_ac_work' 'source ~/.mutt/$my_ac_work'
|
folder-hook $folder 'source ~/.mutt/$my_ac_personal'
|
||||||
folder-hook '$my_ac_university' 'source ~/.mutt/$my_ac_university'
|
source "~/.mutt/$my_ac_work"
|
||||||
|
folder-hook $folder 'source ~/.mutt/$my_ac_work'
|
||||||
## Switch to default account on startup
|
|
||||||
source "~/.mutt/$my_ac_university"
|
source "~/.mutt/$my_ac_university"
|
||||||
# source "~/.mutt/$my_ac_personal"
|
folder-hook $folder 'source ~/.mutt/$my_ac_university'
|
||||||
# source "~/.mutt/$my_ac_work"
|
|
||||||
|
|
||||||
## Keys
|
##------------------------------------------------------------------------------
|
||||||
macro index <f2> '<sync-mailbox><enter-command>source ~/.mutt/$my_ac_personal<enter><change-folder>!<enter>'
|
## Sidebar
|
||||||
macro index <f3> '<sync-mailbox><enter-command>source ~/.mutt/$my_ac_work<enter><change-folder>!<enter>'
|
##------------------------------------------------------------------------------
|
||||||
macro index <f4> '<sync-mailbox><enter-command>source ~/.mutt/$my_ac_university<enter><change-folder>!<enter>'
|
|
||||||
|
## TODO: fix sidebar output.
|
||||||
|
set sidebar_visible = yes
|
||||||
|
set sidebar_sort = yes
|
||||||
|
set sidebar_width = 50
|
||||||
|
# set sidebar_delim='|'
|
||||||
|
# set sidebar_folderindent = yes
|
||||||
|
color sidebar_new yellow default
|
||||||
|
|
||||||
|
## color of folders with new mail
|
||||||
|
color sidebar_new yellow default
|
||||||
|
|
||||||
|
## ctrl-n, ctrl-p to select next, prev 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
|
## Aliases
|
||||||
|
@ -104,10 +131,13 @@ source $alias_file
|
||||||
## Keys
|
## Keys
|
||||||
##------------------------------------------------------------------------------
|
##------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Remap bounce-message function to "B"
|
||||||
|
bind index B bounce-message
|
||||||
|
|
||||||
## Manual fetch.
|
## Manual fetch.
|
||||||
bind index "^" imap-fetch-mail
|
bind index "^" imap-fetch-mail
|
||||||
|
|
||||||
## Fix the BackSpace bug that happens on some terminals.
|
## Fix the backspace wrong binding that happens on some terminals.
|
||||||
#bind index,pager previous-page
|
#bind index,pager previous-page
|
||||||
|
|
||||||
## Fix Backspace -- Shell alternative.
|
## Fix Backspace -- Shell alternative.
|
||||||
|
@ -161,3 +191,4 @@ source "~/.mutt.d/colorset.sh|"
|
||||||
source "~/.mutt.d/colors.ambrevar"
|
source "~/.mutt.d/colors.ambrevar"
|
||||||
#source "/usr/share/doc/mutt/samples/colors.default"
|
#source "/usr/share/doc/mutt/samples/colors.default"
|
||||||
#source "/usr/share/doc/mutt/samples/colors.linux"
|
#source "/usr/share/doc/mutt/samples/colors.linux"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue