hook sh script to libnotify
from t0mri@lemmy.ml to linux@lemmy.ml on 10 Jan 05:14
https://lemmy.ml/post/24621620
from t0mri@lemmy.ml to linux@lemmy.ml on 10 Jan 05:14
https://lemmy.ml/post/24621620
i have a sh script. i want libnotify to call that script instead of dunst or anything
thanks
threaded - newest
We need more info. What’s the script code? What are you trying to accomplish?
Libnotify backends are D-Bus services, which isn’t really something you’d want to implement in a shell script. Going by some source code I just found, it looks pretty straightforward to do in Python, so that’s one option.
The easier option would be to use an existing notification daemon that lets you disable the default GUI and specify a script to run as a hook, but I don’t actually know of any like that.
tiramisu sends notification to stdout, so you can write a wrapper around it to call any program or script you want.
e.g. (using herbe to display notifications):