Mutt sidebar

From wikinotes

Mutt sidebar is a patch for mutt that shows multiple inboxes in a sidebar.
It was merged into mutt in mutt-1.7.

NOTE:

Sidebar has been modernized since this was written. Check out sidebar commmands in manual for potentially better options.

Documentation

mutt manual http://www.mutt.org/doc/manual/#sidebar
patch homepage http://www.lunar-linux.org/mutt-sidebar/

Locations

~/.mutt/mailboxes sidebar contents
~/.mutt/muttrc configure sidebar keybindings

Configuration

Mailboxes

The mailbox command defines mailboxes.
You can add several mailboxes at once, or invoke mailboxes multiple times.
Every defined mailbox will appear within the mutt sidebar.

  • + prefix refers to the current folder (in this case likely ~/.mail).
  • -label param for mailboxes allows you to rename your mailbox.
  • Outside of sidebar, you can list all mailboxes using y key.
mailboxes -label "pers/INBOX" "+pers/INBOX"
mailboxes -label "family/INBOX" "~/.mail/family/INBOX"
mailboxes -label "storage" "imaps://<email>@imap.gmail.com:993/INBOX"
# ...

categorized mailboxes

I used to define mailboxes like this, but I now think labeling them is superior.

# ~/.mutt/muttrc

mailboxes                    \
" --- WORK ----"             \
    "+work/INBOX"             \
    "+work/[Gmail].Drafts"    \
    "+work/[Gmail].Sent Mail" \
" --- PERS ---"              \
    "+pers/INBOX"

Sidebar Config

# ~/.mutt/muttrc

source ~/.mutt/mailboxes

set sidebar_visible = yes
set sidebar_widte = 25
set sidebar_delim = '|'
set sidebar_sort = no
color sidebar_new yellow default

bind index,pager <Esc>k sidebar-prev
bind index,pager <Esc>j sidebar-next
bind index,pager <Esc>o sidebar-open
bind index,pager <Esc>u sidebar-scroll-up
bind index,pager <Esc>d sidebar-scroll-down
bind index,pager <Esc>g sidebar-scroll-up
bind index,pager <Esc>G sidebar-scroll-down