Weechat and remote growl notifications

by Thor Erik — on  ,  ,  ,  , 

So I decided to move to WeeChat, but I ran into one issue I've always had with irssi, I like to get a desktop notification that is visual and gives me info if there is something I have to respond to or if it can wait like most other clients does.

I started looking into growl notifications since I already got growl and It's usually quite good. First off, there is a lot of scripts out there for this, but most are designed to talk to Growl 1.x, using Growl's UDP (feature removed in 1.3 because it didn't work for the majority of people).

Eventually I fell back to growl.py, which turns out uses Growl's GNTP(Incorrectly refered to as Growl Notification Transport Protocol, actually called Generic Notification Transport Protocol), a TCP protocol. So what I wound up doing, since my weechat runs on a remote system I use daily and are connected to close to 24/7.

The configuration I wound up with is the following:

In my ~/.ssh/config:

Host myhost
   HostName myhost.example.com
   RemoteForward 23053 127.0.0.1:23053

On my weechat (replace password with the actual remote password you configure in Growl):

/script install growl.py
/set plugins.var.python.growl.hostname localhost
/set plugins.var.python.growl.password password

I also had to add the folowing to growl.py at line 72:

    logging.basicConfig(level=logging.ERROR)
    from gntp.notifier import GrowlNotifier