Mutt tutorial part 3 - sidebar, URLs in e-mails

Information in this post came from lunar linux page. Kudos to its author. In this post I want to discuss two topics: sidebar and how to open urls form inside mutt. Sidebar is mutt feature delivered in mutt-patched package in Debian. It cause to split standard mutt window in two parts. In first we can find list of folders defined in the $HOME/.muttrc file, second window is a known old window with the list of posts. Mutt window with sidebar looks like on the picture below:

img

To use side bar we need to install mutt-patched packed in Debian:

1
sudo apt-get install mutt-patched

To make side bar more accessible I use default settings from lunar linux page. Add below lines to $HOME/.muttrc:

1
2
3
4
5
6
7
8
9
set sidebar_width = 30
set sidebar_visible = yes
color sidebar_new yellow default
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

First line sets width of side bar it depends on how long are your folder names. Second line makes sidebar by default visible. Third makes folders with new messages yellow. Other lines create shortcuts for navigating sidebar. Note that C is not Ctrl but uppercase ‘c’ key. Second topic I want to discuss is how to open urls from inside e-mails. To do this we can use tip from mutt site. As it said we need urlview application:

1
sudo apt-get install urlview

To correctly configure this tool you need to create $HOME/.urlview file. So:

1
vim $HOME/.urlview

In this file we define two things. First will be regular expression which match urls and second will be command line to run when regexp was matched. File looks like below:

1
REGEXP (((https?|ftp|gopher)://|(mailto|file|news):)[^? "]+|(www|web|w3).[-a-z0-9.]+)[^? .,;":] COMMAND chromium %s

Chromium is my browser of choice but you can use firefox, lynx or anything you want.


Piotr Król
Founder of 3mdeb, a passionate advocate for open-source firmware solutions, driven by a belief in transparency, innovation, and trustworthiness. Every day is a new opportunity to embody the company's vision, emphasizing user liberty, simplicity, and privacy. Beyond business, a casual chess and bridge player, finding peace in nature and nourishment in theology, philosophy, and psychology. A person striving to foster a healthy community, grounded in collaboration and shared growth, while nurturing a lifelong curiosity and a desire to deeply understand the world.