Contact

Dennis Kaarsemaker

Irssi for X-chat refugees

I'm a pretty horrible terminal junkie. As a large scale sysadmin, my life is spent mostly in a terminal, either fixing problems or writing puppet recipes to prevent them. I also manage mail with mutt (though I still mostly read it with evolution) and my favourite editor is vim.

As such, it's rather odd that I use X-chat for IRC, with a bouncer on my VPS, instead of using irssi in screen. Truth is that I've tried to switch from X-chat to irssi many times, but never could get used to it. A week ago I tried again. Determined to make it work this time, I started off with searching a theme that resembles X-Chat. A quick search uncovered Anton Fagerberg's irssi setup, including an X-chat theme.

/set theme xchat
/set indent 25
/set autolog yes
/set join_auto_chans_on_invite no
/set show_names_on_join off
/set channel_sync off

That made a world of difference! I felt a lot more at home already, so was quite motivated to really dig into what was left that annoyed me and fix all those issues. Step one was the nicklist: I really wanted it back. Even in larger channels, where it is less than useful, I like to see and browse through the list of nicks. And on our corporate jabber rooms (yay bitlbee) I find it essential. Fortunately there is a script available that can abuse screen to do this. Problem sorted.

/script load nicklist.pl
/nicklist screen
/set nicklist_automode SCREEN
/set nicklist width 24
/bind mup command nicklist scroll -1
/bind mdown command nicklist scroll 1

Next up was the list of windows. In X-chat I always use the channel tree view to get a quick overview of activity. In irssi I've always found this utterly impossible, the constantly changing window numbers always made me abandon it. A bit of searching, and I found that irssi can assign static numbers to windows. Problem solved! Or so I thought... irssi would now use the gaps in numbering to assign new windows to. This being the last thing to hold me back from really switching to irssi, I went ahead and dove into the code to find a solution. None existed, so I patched irssi myself. The patch adds an option to create new windows at the end of the list, or even at a much higher starting number. New windows now are numbered 200 and up, making it trivial to identify private messages.

/set windows_auto_renumber off
[... renumber all windows to my liking ...]
/set create_windows_at_end on
/set autocreate_window_min_refnum 200

My irssi setup was now usable! I didn't even want to switch back to X-chat, so victory could be declared there and then. But irssi is much more flexible, so why stop here? Another neat trick from Anton's page is the go.pl script. /go ubu<tab> would bring me to #ubuntu. Except it didn't, so I patched the script to make that work. As a bonus /go off now works for taking me to #ubuntu-offtopic. I find that I don't use it much for channels, as the numbers are now static and I can remember them, so it's /win 10 instead of /go ubu. But for PM windows, go.pl is indispensible. Especially at work, where I have dozens of jabber conversations open at any time.

Another well known script is screen_away.pl, automatically setting you to away when screen is detached. I don't like that, but the idea inspired me to write nma.pl, which forwards messages to my android phone when screen is detached. I also use the hilight window as detailed by Anton. I had something similar in X-chat and in irssi it's even better as it's always there!

/script load go.pl
/script load nma.pl
/window new split /window name hilight /window size 3
/script load hilightwin.pl
/statusbar window visible active

So there's my current setup. 1 irssi in screen, connected via znc still to 2 different networks (I'll take znc out at some point) and via 2 bitlbee instances to twitter, google talk and corporate jabber. All my instant messaging needs running in screen on my server, my terminal addiction satisfied for now :)

Comments

  1. Howard Chu

    Howard Chu on 03/17/2013 12:11 a.m. #

    I use Finch. Why be stuck with just an IRC client?

  2. Petteri

    Petteri on 03/17/2013 11:48 a.m. #

    I had been using irssi for years before noticed ctrl+a. Now I am primary switching my windows with it.

  3. Onno

    Onno on 03/17/2013 2:42 p.m. #

    FYI: the links to the Perl scripts (/static/downloads/irssi/) are 403'ing.

  4. martasd

    martasd on 03/17/2013 4:05 p.m. #

    As Onno pointed out, I am also getting 403 on the links to perl scripts.

  5. Dennis Kaarsemaker

    Dennis Kaarsemaker on 03/17/2013 4:24 p.m. #

    Fixed. They're symlinked into ~/.irssi, which was -rwx------

Pingbacks

Pingbacks are open.

Post your comment

Calendar

March 2013
SunMonTueWedThuFriSat
February 2013  
     12
3456789
10111213141516
17181920212223
24252627282930
31