Display desktop notifications for unread mail in notmuch database (clone from github) https://github.com/kspi/notifymuch
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-01 15:00:49 +02:00
bin Parse args with argparse. 2015-04-16 07:06:17 +03:00
notifymuch Use a message ID that works with the notmuch2 API. 2026-09-01 15:00:49 +02:00
README.rst Add screenshot to README. 2015-04-24 10:19:55 +03:00
setup.py Update dependency declaration. 2026-09-01 09:44:05 +02:00

notifymuch
==========

This is a simple program that displays desktop notifications for unread
mail (or actually any search query) in the notmuch database. The notification
can optionally have a button to run a mail client.

.. image:: http://i.imgur.com/F3uAQmt.png                                                                                                
    :alt: Screenshot of notifymuch

When a message is shown in a notification, it is internally marked as 'recently
seen' and not shown again for two days (configurable).


Installation and usage
----------------------

The program requires Python 3, setuptools, pygobject and notmuch.
It can be installed together with its dependencies using::

    pip install .

To use, execute ``notifymuch`` after new mail is indexed (for example in a
*post-new* hook). The program forks and stays in the background while the
notification is active. If upon launch a notification is already active, it
is updated.


Configuration
-------------

Configuration is stored in ``~/.config/notifymuch/notifymuch.cfg``,
which is created on first run. Settings that can be set there:

query
  The notmuch search query for the messages. Default is
  ``is:unread and is:inbox``.
  
mail_client
  The command to launch the preferred mail client. If empty, the button
  isn't shown. Default is ``gnome-terminal -x mutt -y``.

recency_interval_hours
  Each message is notified about at most once in this time interval. Default is
  ``48``.

hidden_tags
  Tag names that are not shown in the notification. Default is
  ``inbox unread attachment replied sent encrypted signed``.