Skip to content

Various issues with notification scripts #433

Open
@trygveaa

Description

@trygveaa

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUnexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions