desktop notifications for irssi nick highlights

I am a long term user of screen+irssi, a quite common way of using IRC for unix-inclined people neckbeards. One problem with this approach is that you will not be notified of events such as nick highlighting and PMs outside of your terminal window.

A quick hack is to use the fnotify irssi script to write highlights to a text file, and then a quick shell one liner to continually read events (lines) from this file and alert you via the gui. This post assumes basic knowledge of irssi, which I’m not going to cover here.

Install fnotify:

wget -P ~/.irssi/

Run it inside irssi:
/run fnotify
[00:16] ~~~Irssi: Loaded script fnotify

Run this on your desktop and let it run indefinitely, and you’ll enjoy being notified of important events instead of finding them after the fact:

tail -n0 -f .irssi/fnotify | xargs -I{} xmessage "{}"

Protip: the xmessage command is a really ugly X11 built-in command and is primarily suited to minimal window managers such as fluxbox. Its notification popups will look quite out of place in a full blown desktop such as Gnome or KDE; using a different command such as notify-send or similar may be more appropriate.