Coder Social home page Coder Social logo

maildirwatch's Introduction

maildirwatch - Watch Maildir for new mail and display notifications

This program allows you to watch a Maildir for incoming email and display notifications when new messages arrive.

The displayed notifications are interactive - programs can be run when the user clicks on them.

Installation

Installation from PyPI:

pip3 install --user maildirwatch

Python3 is required.

Note: PyGObject is a dependency of this program. To install it, you might have to install GObject development libraries on your system. On Debian, the packages libgirepository1.0-dev and gir1.2-notify-0.7 provide these libraries.

Usage

Use the maildirwatch command, or:

python3 -m maildirwatch

The program will run forever or until you interrupt it with Ctrl-C.

To list available options, run:

maildirwatch --help

Configuration

The program looks for the configuration file in $XDG_CONFIG_HOME/maildirwatch.conf or ~/.config/maildirwatch.conf if XDG_CONFIG_HOME is not defined.

The configuration file is in Python's standard config format (understood by the configparser module).

Global options

These options should be put in the [global] section.

  • maildir

    The directory to scan for maildirs. Default value: ~/Maildir.

  • ignore

    Comma-separated list of maildir patterns to ignore. Each pattern must be in fnmatch style. By default, no maildirs are ignored.

  • whitelist

    Comma-separated list of maildir patterns to watch, even if they're matched by ignore.

    You can explicitly select maildirs to watch by setting ignore to **/** and whitelist to patterns that you want to watch, e.g. *Inbox*,*Important*.

  • inhibit-command

    Command to run to check if notifications should be inhibited. If the command exits with 0, the notification is NOT displayed and only a message is logged. Otherwise the notification is displayed.

    If this is undefined, notifications are always displayed.

Actions

Each action is a path to a program and a list of arguments. Every action also has a name that is displayed to the user.

Actions are typically displayed as text buttons below the notification body. When the user clicks on the action button, the action program is started.

Action definitions must be put in [actions] section. Each action is defined like this:

action name = /path/to/program arg1 arg2 arg3...

One action name is special - the default action. The default action's value should be the name of another action instead of path to a program. The program associated with default action is run when the user clicks on the notification itself, not an action button.

Example configuration

Below is an example configuration file that modifies path to the Maildir, ignores spam folder, defines two actions and disables notifications if VLC is running:

[global]
maildir = ~/mail
ignore = *Spam,*foo/bar*
inhibit-command = pgrep vlc

[actions]
default = Show mu4e
Show mu4e = emacs -f mu4e
Start thunderbird = thunderbird

License

Copyright (C) 2019-2024 Michał Krzywkowski

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

maildirwatch's People

Contributors

mkcms avatar mskwarek avatar peterhoeg avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

maildirwatch's Issues

Repeated warnings about removing timer

I'm seeing the following message on both 0.1.1 and latest master (notice the different line numbers depending on version):

Dec 21 09:27:50 midge maildirwatch[1804]: maildirwatch.py:318: Warning: Source ID 2234 was not found when attempting to remove it
Dec 21 09:30:24 midge maildirwatch[1804]: maildirwatch.py:318: Warning: Source ID 2238 was not found when attempting to remove it
Dec 21 09:43:37 midge maildirwatch[1804]: maildirwatch.py:318: Warning: Source ID 2241 was not found when attempting to remove it
Dec 21 09:53:27 midge maildirwatch[1804]: maildirwatch.py:318: Warning: Source ID 2245 was not found when attempting to remove it
Dec 21 09:55:50 midge maildirwatch[1804]: maildirwatch.py:318: Warning: Source ID 2248 was not found when attempting to remove it
Dec 21 10:02:50 midge maildirwatch[1804]: maildirwatch.py:318: Warning: Source ID 2250 was not found when attempting to remove it
Dec 21 10:06:51 midge maildirwatch[1804]: maildirwatch.py:318: Warning: Source ID 2252 was not found when attempting to remove it
Dec 21 10:13:50 midge maildirwatch[1804]: maildirwatch.py:318: Warning: Source ID 2254 was not found when attempting to remove it
Dec 21 10:15:59 midge maildirwatch[1804]: maildirwatch.py:318: Warning: Source ID 2258 was not found when attempting to remove it
Dec 21 10:18:13 midge maildirwatch[1804]: maildirwatch.py:318: Warning: Source ID 2262 was not found when attempting to remove it
Dec 21 10:20:31 midge maildirwatch[1804]: maildirwatch.py:318: Warning: Source ID 2265 was not found when attempting to remove it
Dec 21 10:40:58 midge maildirwatch[1419866]: maildirwatch.py:369: Warning: Source ID 10 was not found when attempting to remove it
Dec 21 10:43:05 midge maildirwatch[1419866]: maildirwatch.py:369: Warning: Source ID 13 was not found when attempting to remove it
Dec 21 10:44:43 midge maildirwatch[1419866]: maildirwatch.py:369: Warning: Source ID 16 was not found when attempting to remove it

All dependencies:

/nix/store/zy9wbxwcygrwnh8n2w9qbbcr6zk87m26-libunistring-0.9.10
/nix/store/hdhry3r378w1n6vw3kl52f8cli7a762g-libidn2-2.3.0
/nix/store/9l06v7fc38c1x3r2iydl15ksgz0ysb82-glibc-2.32
/nix/store/xkb8r7gfc47r48wa1i2lihphcxgk7nsj-pcre-8.44
/nix/store/2pfj8k3nnkqhnlxk1259sbryal707592-libselinux-3.0
/nix/store/alzajdlf96rka7x6al44cxd60sqbfhkn-util-linux-2.36
/nix/store/pmy6g9dljads87bhg7q0lj08cyvsf13m-libffi-3.3
/nix/store/ys6akcfqbzbmvfz97l8mj2fmyilrh3hp-zlib-1.2.11
/nix/store/iwj5pmz0nnal8k5g3jxmlm4h8rkqf9g0-glib-2.66.3
/nix/store/269dnw0iq3akgdsl8xwxgpbsd3kh5yr0-glib-2.66.3-bin
/nix/store/7in2alrzhkpcax5fk4823ismvsmdk1aj-gcc-9.3.0-lib
/nix/store/r3j288vpmczbl500w6zz89gyfa4nr0b1-bash-4.4-p23
/nix/store/2zmr8wqjh6fibrzgdwqp7f79c9ak6jy8-gettext-0.21
/nix/store/61d94j38xyj61ggf5anv44xx5kdrpjwl-libelf-0.8.13
/nix/store/7z2q9kqrc28w5p7llq5lxywsni19xwh2-zlib-1.2.11-dev
/nix/store/i79avwy6757zlfwjkyawxfhsqm59pshm-libffi-3.3-dev
/nix/store/31dfd62q1456yj5n0r6mfj4qpknhfvpd-openssl-1.1.1h
/nix/store/8dx76ns4idf66mpld0k73phh82vyjzvh-xz-5.2.5
/nix/store/ba3mg4j6qmlqbf4k22ffl09y9vmv11rn-ncurses-6.2
/nix/store/lcrrjmcsaf7ykrv16i9n80b1skbbi5li-sqlite-3.33.0
/nix/store/lmw5nvbhnkvmg42473aw68kzslg38q4n-bzip2-1.0.6.0.1
/nix/store/njspd6w54apsizlap0bpk1z9g26zp5vw-readline-6.3p08
/nix/store/qjfw9byvqgfyzan6g8aylz3zzdgz2mi9-gdbm-1.18.1
/nix/store/sdrqv0321smjlx2a6kn3l7caf32jngql-expat-2.2.10
/nix/store/i9lzacdfrwlj1ayw551c016s0fq71p7j-python3-3.8.6
/nix/store/rbqzavlnnpckprxqf0g2lh0q3ldcbw8a-linux-headers-5.9.8
/nix/store/wnadrr7lg4p2gzyb2zxhbd59sbwx650i-glibc-2.32-bin
/nix/store/dkm3gwl0xrx0wrw6zi5x3px3lpgjhlw4-glibc-2.32-dev
/nix/store/y1840v8a0d4j8cjgp8459rji82m0fjj0-glibc-iconv-2.32
/nix/store/0fcg2q2rhwivzn4v6jh3bfvgwak1qgj8-glib-2.66.3-dev
/nix/store/0h01qdnaz840zamx4ar72gnvwsh95nxf-libssh2-1.9.0
/nix/store/2hk7nylygj4bm89lk7xlc6j8479rgp1s-keyutils-1.6.3-lib
/nix/store/0jr79prrz92nx3qdf4b8ap526spvc656-libkrb5-1.18
/nix/store/n4ds741zsjji4xj7ms4qlaf28lxk392y-libpng-apng-1.6.37
/nix/store/0ljzwkymlijx965ybcc59x343362s3hz-freetype-2.10.4
/nix/store/8015c01rsxwas0clrnrlmcjrc6nys7mz-libXdmcp-1.1.3
/nix/store/bavjgcrxbjvv2p6wfvbvl1mlc1jqaxnm-libXau-1.0.9
/nix/store/44m4434m802xvivk8j1qj6ga53q56wrw-libxcb-1.14
/nix/store/adzfjjh8w25vdr0xdx9x16ah4f5rqrw5-libX11-1.7.0
/nix/store/gpslbhxi6z443715ajl16f1ba4l4qxvr-libICE-1.0.10
/nix/store/wi3v8jmpb5kwli9p771q970nvjagkj32-attr-2.4.48
/nix/store/ww19bncc6kcg40q6bsbgpfrx0isrpnnr-acl-2.2.53
/nix/store/0wsp8l445n8cx13jbjbrcqzgyzf0s7bj-coreutils-8.32
/nix/store/1844bjrdaiiqnhrnyrc7jqiiaj05kfiq-libcap-2.44-lib
/nix/store/rki5fn25vk7x7bakgyg94xkkpflvlq3x-libgpg-error-1.38
/nix/store/4wp9l06ff9z5s2mng9y4cyiljpr8x2xi-libgcrypt-1.8.7
/nix/store/hyw4vbzzhzxzsnpaqqvk397c4pd3w5sx-gzip-1.10
/nix/store/9ar57fzgiqdp8fbcp04rrhpf3g1m1z3r-cracklib-2.9.7
/nix/store/vrpl7y24vf5d17r2f226brc1j400c84h-db-4.8.30
/nix/store/kikxb5vmibdkr04amvc2bsajm4yqci5j-linux-pam-1.3.1
/nix/store/rz0s5fmhb306nz57yxsb8aqlpmyp1pzs-bzip2-1.0.6.0.1-bin
/nix/store/8z46w15dj6cdwppjm1yixwfvqmscfkka-kbd-2.0.4
/nix/store/ddlq4wwhk9i644ydzx64z0jzyg9z7p45-gnutar-1.32
/nix/store/q047i5fm9pac1zmja6r42lgw6xk2zmnj-readline-7.0p5
/nix/store/fw8bc7hlnc1m6aarihm964g5r74rxqij-bash-interactive-4.4-p23
/nix/store/7475qsj52iygd13f4fpg0kvi84pikzlx-json-c-0.15
/nix/store/djcnh450sy0rpvicw5z9p9nvs3afpk1p-popt-1.16
/nix/store/j50xs06qjh05nyp5hbmq5syxhkaacgsz-audit-2.8.5
/nix/store/qdgbawpnwsn02f8z7a3ahxn7rkvamwgi-kexec-tools-2.0.20
/nix/store/r716r6x6bqlvkbhlhgcvbsafk0ddbcy0-libseccomp-2.5.1-lib
/nix/store/yshlwb3wb3n9g780als95qx6dw0jk5kr-shadow-4.8.1
/nix/store/wfwxrx7rynlxf497sw8zjvx8ax01i1hh-util-linux-2.36-bin
/nix/store/xf2wwv631qcq6ljffijw8drp6k08zg0s-kmod-27
/nix/store/1r981b49b3lin050mfrkwxzxixf2sscw-systemd-minimal-246.6
/nix/store/rb5lfi2ilyc5c26lvzaq6npbgq5y1pz8-lvm2-2.03.10-lib
/nix/store/g2l1hliymrzxwbh9k70zjagym4dhrz49-cryptsetup-2.3.4
/nix/store/hr35cyjh21r445gzir7dxfnd8fv8r9cw-libapparmor-2.13.5
/nix/store/58iqzc5rrqgdczaivxja1zg1c1qaxix9-gmp-6.2.1
/nix/store/7m69rqlfiw508nb8h6qgln89vzs0kn8w-nettle-3.6
/nix/store/f244l6wjc197r26fxl5809565q7qmf59-dns-root-data-2019-01-11
/nix/store/w1hgqacrf2jkd0xza41vjhk76awqnjkg-libtasn1-4.16.0
/nix/store/dysc6dblmkmd32d98q1sk7z2bsm612zl-libevent-2.1.12
/nix/store/xw0cv0qcq8andd38z8yp95rx2i12xdqh-unbound-1.12.0-lib
/nix/store/znlcsav3fz7ng4g7mycq9a3psr462d53-p11-kit-0.23.21
/nix/store/zsm520xz3ybyd1gpdv6v3a1mxc754bpw-gnutls-3.6.15
/nix/store/lwazgrni7is4fpvcl9671qmrb2sgk4zq-libmicrohttpd-0.9.71
/nix/store/nbbcqdwssvnv6315lg1j87ajq2r02nif-pcre2-10.35
/nix/store/pzjln234js3kj8hg0nnj7k18y1fbph6z-lz4-1.9.3
/nix/store/x66p0sazbscfpaxsspdx6lasv6aw31gf-libassuan-2.5.4
/nix/store/q2hsxz5v5pd65b65mkpy6cvrd55mgyy3-gnupg-2.2.24
/nix/store/vz3r19zlqgnkp7xwm8cf6567vb3ls3p5-nghttp2-1.41.0-lib
/nix/store/rb0a1s16fby8hhc9vr7mqvvs1ywjp1i3-curl-7.73.0
/nix/store/c0vvdpmi9dxhzh57s1hcnlkrzp1xyfnr-libpcap-1.9.1
/nix/store/rs64id7fq47xzwyl1s378f3ss0qmz1p9-libmnl-1.0.4
/nix/store/y62fynx5v6wp7x0rwid6fpnvgjk6kbgh-libnfnetlink-1.0.1
/nix/store/gzwc690iljy3h9y86msa2x80vfyldk42-libnetfilter_conntrack-1.0.8
/nix/store/vb87hvv2ya2904jkx0qkqqxzhsvddlln-libnftnl-1.1.8
/nix/store/vw1pm31gz0pjqfzarlgjaldb4kyybn54-iptables-1.8.6
/nix/store/gyg6zyw1f0d1ahh1yk0pl18sxwx5a3zc-systemd-246.6
/nix/store/v3ailjggirlppwxb0dbp38h3i80ncfyy-libSM-1.2.3
/nix/store/6jmkm1r9yw7hpzbgnb01a10pv5zn774p-dbus-1.12.20-lib
/nix/store/m9ydqzinms0z1y9ysgl8kpalnl0xrakn-libdaemon-0.14
/nix/store/0nqxx1k9rhvc9bli311lfb1f386l6cjp-avahi-0.8
/nix/store/114dyxnvcji6415n8pw85z5fs6axz1yf-iso-codes-4.5.0
/nix/store/62g87zw32w9avymp728vp1jkb3yylrc6-atk-2.36.0
/nix/store/b7x6klfk19wdhps9d3972qgz9a4cid8m-gsettings-desktop-schemas-3.38.0
/nix/store/brasbayks9qvsy2hvc4rjml5fmif9kqd-libXext-1.3.4
/nix/store/c45b68cf35cflpy30i9jmi70v3y70pkj-libXi-1.7.10
/nix/store/ckspf4mbysm6yb3fzj9k9gl2il9ly5vb-libXtst-1.2.3
/nix/store/n7nzynmpg89k3bklc48yc1bayrpyy47v-dconf-0.38.0-lib
/nix/store/adqz5ywqfsx5msp3vsjnlk0hpr3ym8jz-at-spi2-core-2.38.0
/nix/store/14ir1zjki4rsc5gcb84c335cqjyb1kr6-at-spi2-atk-2.38.0
/nix/store/dpiwbpn6n9v0259z94n91dggh2hazmd5-libjpeg-turbo-2.0.6
/nix/store/19y3lc5xkyglvcd0nprrdr27m1axh5rc-libtiff-4.1.0
/nix/store/1hrpdxc1csq2lpwds4zfv9177m86ll61-cups-2.3.3-lib
/nix/store/szphjhh0j68yhddyw2zh8ykr00mhd1r2-publicsuffix-list-2019-05-24
/nix/store/1nk9dqp4hcb16fl0k186lwww05lp5j8q-libpsl-0.21.0
/nix/store/8f5zlkkcr2ih0b6fnf59rshl1y8qs3yg-libXfixes-5.0.3
/nix/store/1qj29ipxl2fyi2b13l39hdircq17gnk0-libXdamage-1.1.5
/nix/store/mmdv199syc8mhj5xnyycgfahvxny3wrw-xorgproto-2020.1
/nix/store/6skbc0afgpkgb79xlvvwlhv2cw97a8mm-libXau-1.0.9-dev
/nix/store/22wmqgpmawqzdxmpdd3ijrpy9wimln55-libXext-1.3.4-dev
/nix/store/p40vbp5fcdppvzyg4czgqhz32vknk42b-libxml2-2.9.10
/nix/store/2z8xim9d6g719dcqr2c7msqm9hxylabq-llvm-9.0.1-lib
/nix/store/4ar717wmirszsx8ysmqbvwyivx2xf5vy-libXxf86vm-1.1.4
/nix/store/7x23sl2m7j262zizh19kw92k61zk81xk-libpciaccess-0.16
/nix/store/8x1p2ymyya12qp1rywh7ds1inlqzs057-libdrm-2.4.103
/nix/store/q0blkpyzvlvmpaz99in6k51p2c67p0d4-wayland-1.18.0
/nix/store/ar7gfwghh6phjak9rpc6qryc7x2k94p9-mesa-20.2.3
/nix/store/gqmr9ksi3jyhpsbcrsh4fm5b333a3dcs-libxshmfence-1.3
/nix/store/3zi16a5g0g3j3i3z7l7zsa9mpx427zjd-mesa-20.2.3-drivers
/nix/store/rinpk06pbbavxpii30sqvw53f6v12ky6-bzip2-1.0.6.0.1-dev
/nix/store/rwg5jzlk0vbj5h5vwna62z5xacgsxszl-libpng-apng-1.6.37-dev
/nix/store/5wwwfqwadspxjkr110c58dsnm93svcci-freetype-2.10.4-dev
/nix/store/7fhqrk5sgfw8irwkmxx8qwhl54shjbnr-libXxf86vm-1.1.4-dev
/nix/store/vfa8k88c70qhrs7fjdyms6dm1lwhlv0w-xkeyboard-config-2.31
/nix/store/7sfq1g0van47mw2c7ifh38mqigisacba-libxkbcommon-0.10.0
/nix/store/dm1dcag7cxggl7nyjynz9g3sb1i62wll-libdatrie-0.2.12
/nix/store/96ll231pi5kz1zw9p3nj6cx4kz06cq2d-libthai-0.1.28
/nix/store/vkk4xcs10s02l2b6188dr4kdcl9ss7yy-libdrm-2.4.103-bin
/nix/store/cs89rk528dmg5s131q696hhqv3s1wgk3-libdrm-2.4.103-dev
/nix/store/jdiigpqln07i6cbjfkywksrp1n5rim5w-libXfixes-5.0.3-dev
/nix/store/ihvviyiwijyih0998wh1872c0rcssnfn-libXdamage-1.1.5-dev
/nix/store/97136295hqdayx6ibhazviw7kincn8m9-mesa-20.2.3-dev
/nix/store/9x17nh3sj796djr80javp5mim7l02pav-fribidi-1.0.10
/nix/store/jkr7xcm5gq17gsjwx77sy0f047w161z5-dejavu-fonts-minimal-2.37
/nix/store/wprkhwwj49lchnqjfmzpac5ps92rvi6d-fontconfig-2.13.92
/nix/store/qkjjskqg2s8ylhq1ydhghy4f0wl39j3r-fontconfig-2.13.92-lib
/nix/store/a63wlnvqax9jyfr070rs32fpd306d6ml-fontconfig-2.13.92-bin
/nix/store/ahvqa9a93xl87ibygcs2fy8r1xbksfdb-fontconfig-2.13.92-dev
/nix/store/cj2sd62d6k3y2dpy2n5aw3k8c6kr6smx-expat-2.2.10-dev
/nix/store/f9vvdawkn1fxiifdhjniic18j904l8w1-graphite2-1.3.14
/nix/store/fiix5d75x91x70bs7pxspi74c1l5ms1m-harfbuzz-2.7.2
/nix/store/ssfpdmsz8ygvkiv20b8wz57wq6qzy0h6-libXrender-0.9.10
/nix/store/fmh56mhin1zdqlil35wk1y5q07378hrz-libXft-2.3.3
/nix/store/pr3jkwd1in1pkf1py1d95q4f97v5v10c-pixman-0.38.4
/nix/store/yac0mc9q0vfsax33gsnmj1cpvp8pcc4v-libglvnd-1.3.2
/nix/store/pmbd5958zr648hnb7j2p299nz75d06w2-cairo-1.16.0
/nix/store/dq9v250b2siq34c5zgdni3il3wchz7dh-pango-1.47.0
/nix/store/kdcr7rddr432nxydrwc7ps6i2nckdjvz-gdk-pixbuf-2.42.0
/nix/store/fdyhnc3hxc4qzr16g489jm4smavr3v1v-libnotify-0.7.9
/nix/store/ijzpcfrpavadrcckqhkq6mk54xv9lf62-python3.8-pycairo-1.18.2
/nix/store/zk8sbcd70gmk1cp7fsl2155g7sw1nzb3-libGL-1.3.2
/nix/store/gwl7v0bba5805m5blzqd69snb41rndzs-epoxy-1.5.4
/nix/store/db8ghplv35b5ywd7qwrh3ikm2frxxa8a-icu4c-67.1
/nix/store/q43aa97n05wkrldvb2vdfinn7p10p3hz-json-glib-1.4.4
/nix/store/d9s35grxapwkb6c4qmz8h4k8y56qgkwq-brotli-1.0.9-lib
/nix/store/r793nxylzqhxlygv380zil2hn9cghq32-libsoup-2.72.0
/nix/store/z4psvlddvv3gdl5iyds8p7jbqs33cbql-gobject-introspection-1.66.1
/nix/store/im9dlyzrrdzvi6r4syif985kj8dpvvf5-tracker-3.0.1
/nix/store/jqgj83hxlymsh82icfccp14grq0f9hrk-libXrandr-1.5.2
/nix/store/mxy51x9aq3291v89c3m08pav3x4zw1gv-libXcomposite-0.4.5
/nix/store/n6cim6dgi493b7dy41df8k2208fxzddr-libXcursor-1.2.0
/nix/store/plvpvzh70x20zvppm8nl5mn815kp4l0j-libXinerama-1.1.4
/nix/store/mcllzm7xym0pw9g36w3vm8q3wh51qzn5-gtk+3-3.24.23
/nix/store/hadcvwsfy5n37dx821aysgw7vn33ci0k-libxcb-1.14-dev
/nix/store/pghxzmnmxdcarg5bj3js9csz0h85g08m-libglvnd-1.3.2-dev
/nix/store/iach6d323fd6nyp69pdak712l66pa6i3-libGL-1.3.2-dev
/nix/store/n9nzwn7v9inzfjl955ms6mj0pd8p316g-xcb-util-0.4.0
/nix/store/p0h50ddyq7bab72hdsvm5am9h9xnwixs-xcb-util-0.4.0-dev
/nix/store/b92bxvw4hizsb8kmhjf56mmkjqb9x1h0-libX11-1.7.0-dev
/nix/store/sp9p257ajx108r2zaaxng35h9rc5d8n6-libXrender-0.9.10-dev
/nix/store/qabmw83w0lgpcqkfdpkamy5swkxaix8p-cairo-1.16.0-dev
/nix/store/yxlrklvppya794bjs9ajjqgcig9xksc5-python3.8-pygobject-3.38.0
/nix/store/x2h02wgj30grm4n0dmvdvlkaanhq1kbf-python3.8-pygobject-3.38.0-dev
/nix/store/b52w6i1f5k48pgbjky0cl8virm71v0xs-maildirwatch-0.1.1.20201219

Feature Request - respect notification inhibitors

It's possible in KDE (and presumably also in GNOME) to set a "do not disturb" mode. It would be very elegant if maildirwatch could query the status over dbus in order to suppress notifications in case notifications are temporarily suspended.

This is how to query the status using dbus-send:

$ dbus-send --session \
  --dest=org.freedesktop.Notifications \
  --print-reply \
  /org/freedesktop/Notifications \
  org.freedesktop.DBus.Properties.Get \
  string:org.freedesktop.Notifications \
  string:Inhibited

Ideally of course maildirwatch wouldn't do this unconditionally but only when enabled using a --honor-do-not-disturb-mode or similar argument.

Dependency problem on Debian bullseye

There is a problem with dependencies on Debian 5.4.19-1 (2020-02-13) x86_64:

$ maildirwatch
Traceback (most recent call last):
  File "/home/marcin/.local/bin/maildirwatch", line 5, in <module>
    from maildirwatch import main
  File "/home/marcin/.local/lib/python3.8/site-packages/maildirwatch.py", line 122, in <module>
    gi.require_version('Notify', '0.7')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 129, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Notify not available

I've installed mentioned package libgirepository1.0-dev but it's not enough. Application requires also gir1.2-notify-0.7.

Use standard dbus interface for notifications

Further to #5, would it be possible to use the standard DBus notification interface?

A bit of background. I wrote a small tool to handle reminders in .ics files synced from O365 and needed a mechanism to notify. I thought "no problem, I'll use libdbus as it allows me to also read the do-not-disturb status before actually sending the notification and I can then just send them directly" but I then discovered, that when you simply use the org.freesktop.Notifications interface, the do-not-disturb bit is handled automatically for you.

I understand that you might want to use libnotify to abstract away the details of the various platforms on which you run, but maybe there is a way to have it simply use the dbus interface so the desktop environment will handle it like any other application doing notifications.

Feature Request - whitelist directories to monitor

Instead of having the option to ignore unwanted directories, it would be great to be able to simply include the ones that I do want monitored.

My usecase is basically that unless it's in my inbox I don't care about it, so that means a whole lot of ignoring.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.