‘ii’ (Irc It) irc client

‘ii’ (Irc It) irc client

For years I used irssi under multiple screen sessions to connect to irc. For the past few months, I’ve been using znc and connecting to it with various clients (xchat, colloqui, irssi, quassel, etc). But, also for several months, I’ve been wanting to try out ii. It’s a minimalistic irc client – less than 500 lines of code – by the folks who gave us dwm and wmii. It creates a directory ($HOME/irc/network-name) for each network, a directory for each channel and PM under there, and, in each of those as well as the network directories, an ‘out’ file and an ‘in’ FIFO. So, for instance, I might

irc -n nick -s irc.freenode.net

and join #ubuntu-server with

echo “/j #ubuntu-server” > ~/irc/irc.freenode.net/in

after which ii will create in and out under ~/irc/irc.freenode.net/#ubuntu-server/.

As most people I’ve mentioned this to, my first reaction was “really neat, very scriptable, but not very usable.” But the thing is, whatever tools you would like to have to make it more useable, you can trivially write them. Here are the ones I use (mostly taken from http://tools.suckless.org/ii/usage):


Pcw (“popup chat windows”) uses inotify to monitor file activity by ii. By default it creates an xterm for each channel and pm, popping up new ones if one is not already open for that channel. Each xterm runs srw (see below) to give you a nice interface to the channel.

A neat thing about pcw is that it uses an external script, pcw_win.sh, to fire off the program to interact with each channel. To change it, just write your own pcw_win.sh and make it show up first in your PATH.

For instance, when I use pcw, I use it with byobu-tmux. The pcw package at ppa:serge-hallyn/vimprobable has the script needed to do that under /usr/lib/pcw/. So I’ll open a different window for each network, and do (an alias for):

PATH=/usr/lib/pcw:$PATH pcw -n nick ~/irc/irc.freenode.net

Now each channel and PM will show up as separate panes on the same tmux window.

plain srw

If I just want to focus on one channel (for instance a meeting on #ubuntu-meeting), I run srw by hand:

	cd ~/irc/irc.freenode.net/#ubuntu-meeting
	srw -p "#ubuntu-meeting: " cw out in

Note that pcw ships with a script, cw_color.sh, which should provide an even nicer (color-highlighted) interface, but I’ve not played with it yet.

I haven’t done it yet, but am considering writing a little ‘channel bar’ gui which would list each channel along with time of last message. Clicking on a channel would bring up srw for that channel. (It’s too bad that inotify doesn’t work over sshfs).

google chat interaction

As I’ve blogged here, it’s not too much trouble having irssi or znc forward chat messages to your google chat account. However, responding via google chat, that I’ve not figured out how to do. With ii, it’s trivial! The pcw package (again at ppa:serge-hallyn/vimprobable) contains both ‘ii-to-gmail’ which forwards any private messages or channel traffic with your nick, to your google chat. The gchat-ii.pl script does the inverse! If I sent a message to my irc google chat account saying ‘i #ubuntu-server hi’, then ‘hi’ will be sent to #ubuntu-server on freenode. There is certainly room to improve – the scrips sending and receiving gchats should be consolidated into one. Then when sending gchats it could create nonces for each network/channel combination sent, which you could use in responses rather than typing the full chan name. (this is all aimed at reducing typing on my phone). But so far it’s working, and working great!


I generally don’t actually run pcw, at least while working. Rather, I follow this example at nion.modprobe.de. I run multitail only on the channels I feel I need to watch, and let ii-to-gmail let me know if there are PMs or activity relevant to me on another channel. For the vimrc shortcuts, I prefix them with ‘;’ (i.e. ‘;f1’ to write the line to channel 1 in freenode). It’s actually a very nice interface!

Oh, one other thing – ii upstream doesn’t support ssl. There is a tiny patch which is supposed to add that support, but it didn’t work for me. But, that’s ok – I use it with stunnel and it works great!

All in all, I’m loving this.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s