www-gem words

The power of emails in the terminal: Neomutt (2/3)

Published on

Accounts-specific config

Stored in the [account_name] file in the mutt folder. Make sure it matches the name used in your .muttrc file.

Neomutt is not boring

Neomutt can use icons as shown in the muttrc file, but you can also make it looks pretty. This is done by defining your colors in the colors file located in the mutt folder.
The basic structure for each color definition is color <element> <foreground> <background>

Here are few examples:

sh
color	 indicator	    bold	    white	default
color	 index_author	cyan	    default	 "~f john.doe@gmail.com | ~C john.doe@gmail.com"
color	 body		    red 	    default	 "(^|[[:space:][:punct:]])\\~\\~[^*]+\\~\\~([[:space:][:punct:]]|$)" # strikethrough

There are also some colorschemes available out there, like on the official website .

Keybindings

Stored in the bind file in the mutt folder.
I will not list all my keybindings, but share the ones that may be less obvious:

  • bind index s vfolder-from-query
    Use Notmuch to search your emails
  • macro index T "<change-vfolder>Today<Enter>"
    Jump to the Today virtual folder defined in the muttrc file
  • macro index,pager cc "<pipe-message>abook --add-email-quiet<Enter><shell-escape>notify-send 'contact added'<Enter>"
    Add a contact to your book (relies on abook)
  • macro attach cn "<pipe-message>khal import --batch -a calendar<Enter><shell-escape>vdirsyncer sync my_cal & notify-send 'calendar invite added to your calendar'<Enter>"
    Applied on a. .ics file, add an invite to your calendar (relies on kahl and vdirsyncer )
  • macro compose S "<first-entry>| sh ~/.mutt/html_send<Enter><attach-file>/tmp/conv.html<Enter><toggle-disposition><tag-entry><first-entry><tag-entry><group-alternatives><send-message>"
    Convert your email in html and send the email as plain text and HTML (see the html section )

This post is part of the Neomutt series
  1. The power of emails in the terminal: Neomutt (1/3)
  2. The power of emails in the terminal: Neomutt (2/3)
  3. The power of emails in the terminal: Neomutt (3/3)

More food for thoughts? Check other posts about: #Cli


Thanks for your read. Hope it's been useful to you.


Interact with this post using Mastodon or

Comment on wwwgem's post

Copy and paste this URL into the search field of your favourite Fediverse app or the web interface of your Mastodon server.

✄ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈