Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upVarious issues with notification scripts #433
Comments
lnotify.py and all of the other local notification scripts for linux in the repo have issues (see weechat/scripts#433), so recommend the trigger in the wiki instead, which seems to work great.
This is not a bug report against a single script, more a comment about some of the notification scripts in the repo. There are a lot of them, many for various use cases, but also many similar for the same uses cases, and many of them doesn't work properly.
I tested all the scripts I could find which create notifications on the local machine on Linux. Most of them didn't work properly, so here are some findings:
anotify.py, notify.py, weenotify.py
I experienced all of these consistently causing WeeChat to hang when running
/quit. I had to kill WeeChat with sigkill. All of these use the notify2 library in python, so there's probably some issue with using this in WeeChat. Not sure if it's some specific issue on my machine or if it has to do with the versions used. Tested on Arch Linux with WeeChat 2.9, Python 3.8.5 and notify2 0.3.1.lnotify.py
Calls
xdotoolandpsin a blocking way. I have experienced WeeChat hanging with this becausexdotoolran into some error and ran for a long time. Error messages fromxdotoolis also printed directly to stdout, which causes garbled display in WeeChat (until you press ctrl-l).notify_send.pl
Calls an executable which is defined in the config with the arguments you want to pass for buffer name, message, etc., but passes each word as a separate argument to the executable, so I couldn't get it to work properly. E.g. the default command
notify-send $type: $name &>/dev/nullis excecuted asnotify-send '$type:' '$name' '&>/dev/null', which makesnotify-senderror with the message "Invalid number of options.". It also callsnotify-sendin a blocking way, so it may hang WeeChat.chanotify.py
Only supports IRC. Apart from that, seems to be the only of these scripts which actually work properly.
notifym.pl
Only supports IRC. It also calls
notify-sendin a blocking way, so it may hang WeeChat.windicate.py
Seems to only support Ubuntu, so I didn't test this. But I see that it calls
wmctrlandpythonin a blocking way.inotify.py, notification.py
Only supports Python 2.
Triggers
I also tested the trigger in the wiki, and that works great, both for IRC and other messages.
Maybe some of the scripts should be removed from the repo?