Fedora People Rule!Wed, Mar 21, 2007
The content of the post was a quick way to set up notifications using libnotify when someone either shouts your name or says your nick in irssi. So I thought I’d give it a try. His is an alteration to the original found here.
After about 10 minutes of effort and a little bit of tweaking, I now have a script that will notify me every time someone says my name in irssi. It was really easy to setup. His had one little bug which I’ve fixed, so the new script has been posted below.
Essentially, you need two scripts, the remote fnotify, which needs to be loaded into irssi, and the local irssi-script script, which should be loaded when you login. I recommend the ~/.bashrc file. Refer to the original article for helpful details.
Once you’ve got the scripts downloaded. Take the remote fnotify script and rename it to fnotify.pl and place it in your remote ~/.irssi/scripts directory
$ mv fnotify ~/.irssi/scripts/fnotify.pl
Then, inside irssi, go ahead and run the following three commands:
/script load fnotify.pl
If successful, a message similar to this will appear in your irssi control window:
21:20 -!- Irssi: Loaded script fnotify
If any other errors appear when running the /load and /unload operations, it should be okay to continue.
Once this is working, its time to go ahead and start the irssi-script obtained previously.
Once this happens, get someone to say your name in irssi. Once they have done so, you should get messages that looks similar to this in the bottom right hand corner of your desktop:
This worked pretty well for me. A few things could work better but aren’t too bad. I currently have no way of running the local irssi-script as a service or on login without my ~/.bashrc hanging. I’ll have to look further into it before I have a solution.
I hope this is useful for you as it was for me.
PS – As a quick aside; 15 minutes or so into my research, I also noticed another script at the bottom in the comments that was supposed to be able to do it without the extra startup script. When I tried it, I was getting failures within irssi –something about dbus not working properly.