The Quassel irc client was shipped as default in Kubuntu 9.04 and has this lovely feature allowing you to monitor multiple windows simultaneously, see this screenshot for a better idea of what it does.

However, I often want to access IRC from computers I don’t control and thus installing Quassel each and everytime I want to access IRC (it’s main feature is that it’s a distributed IRC client, multiple clients can connect to one core) is impractical. I thus resort to SSH (using one time passwords, who knows what’s sniffing my keystrokes), screen and irssi. However, irssi, out of the box, does not provide you with a ‘monitor’ window similar to Quassel’s. Here are the instructions on how to get one and what the finished product should look like.

Start off by entering the following to create a new split window called ‘monitor’ with a height of 6 lines, and have irssi remember the new layout

/window new split
/window name monitor
/window size 6
/layout save

If you’re using a script like adv_windowlist.pl and chansort.pl, you can also run the following:

/window num 2
/chansort
/layout save

This will set the monitor window’s number to ‘2′ (You can now access in with Alt-2) and will resort the channels in your windowlist.

Now you’ll need to install the trigger.pl script. You can do this by downloading the file and putting it in $HOME/.irssi/autorun/ and then either restarting irssi or running /script load trigger.pl, irssi will print something like [12:31:43] Irssi: Loaded script trigger in your '(status)' window.

Now to the fun part, adding triggers. I like to be able to watch #kubuntu-devel and #kubuntu-netbook. I have the following triggers, which will copy what people say, actions (/me), notices (/notice) and topic changes in those two channels to the window monitor in real-time.

/trigger add -publics -channels '#kubuntu-devel #kubuntu-netbook' -pattern '*' -command 'echo  -window monitor -level PUBLIC $C: <$N> $1'
/trigger add -topics -channels '#kubuntu-devel #kubuntu-netbook' -pattern '*' -command 'echo -window monitor -level TOPICS $C: <$N> $1'
/trigger add -pubactions -channels '#kubuntu-devel #kubuntu-netbook' -pattern '*' -command 'echo -window monitor -level ACTIONS $C: >>> $N $1'
/trigger add -pubnotices -channels '#kubuntu-devel #kubuntu-netbook' -pattern '*' -command 'echo -window monitor -level NOTICES $C:$N -> $1'

If you also want to monitor all incoming private messages (and don’t have the highlightwin.pl script installed), you can also

/trigger add -privmsg -pattern '*' -command 'echo -window monitor -level MSGS <$N> $1'
/trigger add -privactions -pattern '*' -command 'echo -window monitor -level ACTIONS >>> $N $1'
/trigger add -privnotices -pattern '*' -command 'echo -window monitor -level NOTICES $N -> $1'

If you want to monitor every channel, here’s how:

/trigger add -publics -channels '*' -pattern '*' -command 'echo -window monitor -level PUBLIC $C: <$N> $1'
/trigger add -pubactions -channels '*' -pattern '*' -command 'echo -window monitor -level ACTIONS $C: >>> $N $1'
/trigger add -pubnotices -channels '*' -pattern '*' -command 'echo -window monitor -level NOTICES $C:$N -> $1'

As you can see, the trigger.pl is really quite powerful. For more usage ideas, run /trigger help.

Irssi Monitor Window