zevlg / telega.el

GNU Emacs telegram client (unofficial)
https://zevlg.github.io/telega.el/
GNU General Public License v3.0
1.09k stars 85 forks source link

custom notifications #436

Closed KonstantinDjairo closed 9 months ago

KonstantinDjairo commented 9 months ago

is there any way to redirect the notifications to libnotify or herbe?

zevlg commented 9 months ago

telega notifications uses Emacs built-in notifications package to feed notifications to dbus. If libnotify is able to act as org.freedesktop.Notifications D-Bus service, then there will be no problem.

Also, telega has telega-alert.el contrib package, which redirects notifications into alert.el package, which can use different notifications backends. libnotify is known backend for alert.el, I have not heard about herbe backend for alert.el, but it could be written I think

KonstantinDjairo commented 9 months ago

thanks, i'll take a look into alert.el

KonstantinDjairo commented 9 months ago

alright, it worked here's the code:

https://github.com/KonstantinDjairo/emacs.d/blob/main/telega-misc/notification.el

this runs a modified version of alert.el, which is contained within my repo as well