Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various issues with notification scripts #433

Open
trygveaa opened this issue Sep 16, 2020 · 2 comments
Open

Various issues with notification scripts #433

trygveaa opened this issue Sep 16, 2020 · 2 comments
Labels
bug Unexpected problem or unintended behavior

Comments

@trygveaa
Copy link
Member

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 xdotool and ps in a blocking way. I have experienced WeeChat hanging with this because xdotool ran into some error and ran for a long time. Error messages from xdotool is 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/null is excecuted as notify-send '$type:' '$name' '&>/dev/null', which makes notify-send error with the message "Invalid number of options.". It also calls notify-send in 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-send in 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 wmctrl and python in 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?

  • WeeChat version: 2.9
@trygveaa trygveaa added the bug Unexpected problem or unintended behavior label Sep 16, 2020
trygveaa added a commit to wee-slack/wee-slack that referenced this issue Sep 16, 2020
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.
@sonecudo
Copy link
Contributor

That's a very good report. I do like to use notification scripts in weechat, and I noticed the same issue while using anotify.py
I was trying to figure out the cause of the problem but it seems to require a deeper understanding of weechat.
I hope we can find a work around soon.

@weechatter
Copy link
Contributor

i would recommend to use /trigger and remove not working notification scripts from repo or mark them as inactive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants