Let me just start by saying this: it works on my machine.
The relevant piece of code is this.
#include<libnotify/notify.h>
NotifyNotification *notif;
notify_init("some-name");
notif = notify_notification_new(title, message, NULL);
notify_notification_show(notif, NULL);
Taken from here: Working with libnotify.
This is probably the fifth time I've done a version of this thing. Here is an example that uses a list of parameters to show information about a song. I use this to add desktop notification to cmus.
I know almost nothing about C, so if anyone has an idea of how this could be improved let me know.
Thank you for your time. If you find this article useful and want to support my efforts, consider leaving a tip in ko-fi.com/vonheikemen.
Top comments (0)