top image
home  /  pages  /  tech tips  /  contact about

Mutt sidebar (folder list) patch

News

July 20, 2006 I quit. Looking for new maintainer. Sadly, there seems to be no desire to absorb the sidebar patch into the main source tree. Getting the patch to apply cleanly on every new release (the original mutt source code and the Debian package) takes a few hours every single time and I have too many—more interesting—things going on. Please contact me if you want to take over.
April 5, 2006 patch for Debian's mutt-1.5.11+cvs20060403-1 source package.
April 4, 2006 patch for Debian's mutt-1.5.11+cvs20060330-1 source package.
March 4, 2006 patch for Debian's mutt-1.5.11+cvs20060126-2 source package.
February 25, 2006 patch for Debian's mutt-1.5.11+cvs20060126-1 source package. Includes a minor aesthetic fix for IMAP (with thanks to Luke Ross).
January 27, 2006 patch, tarballs, and packages available for mutt 1.5.11. Also, a patch that plays nicely (mostly) with the mutt Debian package.
August 16, 2005 patch, tarballs, and packages available for mutt 1.5.10i (which includes some cosmetic fixes by yours truly).

Introduction

Mutt is the mail client of choice for people who are wary of fancy graphical user interfaces. I do like Mozilla Thunderbird, Balsa, and even Outlook Express. My biggest problem with all of these mail clients, however, is that I cannot use Vim to write my emails.

Unfortunately, though, mutt lacks an important feature that most email clients do have: a folder list that allows you to see all mail folders you have and how many (new) emails they each contain.

Justin Hibbits wrote a mutt patch that is an approximate fix to this problem. I helped him by adding some features and fixing some bugs.

Features

- A sidebar with a list of folders on the left side of the mutt window.
- Hide/Unhide the sidebar with a single keystroke.
- Every line in the sidebar lists a folder with the total and new number of messages in it.
- Optionally highlight folders with new messages.
- Scroll up and down the list of folders and open the selected folder.
- Configurable sidebar width and colors.
- Configurable key bindings.

Screenshot

Download

Packages

Debian package: mutt_1.5.11+cvs20060403-2.
Download: mutt_1.5.11+cvs20060403-2_i386.deb. (Built with a script that patches Debian source package.)

RPM package for 1.5.11. (Converted from Debian package)
Download: mutt-1.5.11+cvs20060403-3.i386.rpm.

Patches

Latest patch for 1.5.11
For Debian source package: patch-1.5.11+cvs20060126.sidebar.20060225.txt.
For a pristine mutt-1.5.11: patch-1.5.11.sidebar.20060225.txt.

Latest patch for 1.5.10i (to be used against a pristine mutt-1.5.10i)
Download: patch-1.5.10i.sidebar.20050816.txt.

Tarballs

Tarball (mutt-1.5.11, patched)
Download: mutt-1.5.11-sidebar.tgz.

Tarball (mutt-1.5.10i, patched)
Download: mutt-1.5.10i-sidebar.tgz.

Announcements

If you want an announcement when I release a new version of the patch, subscribe to the Mutt Folder List freshmeat project.

Installation

Get the unpatched mutt 1.5.11 tarball, untar it, and apply the patch. For example:

wget -q -O - ftp://ftp.mutt.org/mutt/devel/mutt-1.5.11.tar.gz | tar xvfz -
cd ./mutt-1.5.11
wget -q -O - https://thomer.com/mutt/patch-1.5.11.sidebar.20060225.txt | patch -p1
./configure
make
./mutt
make install (optional, you need to be root for this)

Documentation

Here are the relevant settings from my muttrc:

# set up the sidebar, default not visible
set sidebar_width=12
set sidebar_visible=no

# which mailboxes to list in the sidebar
mailboxes =inbox =ml

# 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 \CP sidebar-prev
bind index \CN sidebar-next
bind index \CO sidebar-open
bind pager \CP sidebar-prev
bind pager \CN sidebar-next
bind pager \CO sidebar-open

# I don't need these.  just for documentation purposes.  See below.
# sidebar-scroll-up
# sidebar-scroll-down

# b toggles sidebar visibility
macro index b '<enter-command>toggle sidebar_visible<enter>'
macro pager b '<enter-command>toggle sidebar_visible<enter>'
#
# Mario Holbe suggests:
# macro index b '<enter-command>toggle sidebar_visible<enter><refresh>'
# macro pager b '<enter-command>toggle sidebar_visible<enter><redraw-screen>'
#

sidebar_width (number)
Width of the sidebar.

sidebar_visible (boolean)
Whether or not the sidebar is visible.

color sidebar_new [fg] [bg]
The foreground (fg) and background (bg) color of folders that contain new mail.

sidebar-prev
Mutt's name for the operation that selects the previous folder.

sidebar-next
Mutt's name for the operation that selects the next folder.

sidebar-open
Mutt's name for the operation that opens the currently selected folder.

sidebar-scroll-up
Only useful if you have more folders than lines in your terminal: scrolls one page up through the list of folders.

sidebar-scroll-down
Only useful if you have more folders than lines in your terminal: scrolls one page down through the list of folders.

Bugs and patches

Bugs? Probably! Patches? Yes, please!

URL: https://thomer.com/mutt/index-old.html
Copyright © 1994-2022 by Thomer M. Gil
Updated: 2006/07/20