Image of the glider from the Game of Life by John Conway
Skip to content for Irssi and Other Script Goodies

So, I was browsing A Guide to Effectively Using Screen and Irssi, and I came across this little gem:

Hilight Window

See the irssi screenshot above. The section labeled "1" is a split window called "hilight". Anything that is hilighted (set using the /hilight command) will be logged to that window.

To do this, first load the script. The script I use is a modified version of cras's that logs timestamps as well. It is available here:

Put the script in ~/.irssi/scripts/autorun/ and type /run autorun/ in irssi.

Next, create the split window. This is done with the /window command. See /help window for details on how this works.

  /window new split
  /window name hilight
  /window size 6

The above commands will create a new split window (as opposed to a "hidden" window, which privmsg, channel, and status windows are by default), call it hilight (so the script knows where to send the information) with a height of 6 lines.

Now, have someone address you in a channel using "yournick: hello". If you did everything correctly, it should be logged to the split window. If you want to have all lines containing your nick hilighted, type /hilight yournick. See /help hilight for advanced features. Use /layout save to save your layout settings and have irssi automatically recreate the split hilight window on startup.

For me, irssi is more than just an IRC client. It's a complete messaging center. I access IRC, Jabber and push to microblogging sites, such as Facebook, and others. Because I'm running behind GNU screen, I want to be aware of any messages while I'm away. Of course, Irssi does this for you automatically, by putting your hilights in the status window. For me, that's a busy window, and it's easy to lose hilights if they sit long enough. So, I'd rather have the hilgihts go to a separate window. Enter that script listed above, along with splitting the window for immediate access.

Now you have a split screen window that your highlighted messages are going to. However, they're also going to your status window when you're away. This is known as your "awaylog". You can change that setting if you want. By default, it logs 'msgs hilight'. If you want to disable it, now that you have a new hilight window, you can set:

/set awaylog ""

Note, that your new hilight window will only log hilights, not msgs. For me, this is no big deal, because msgs are already in their own window by default anyway, and the point of this is to keep all the messages in one place. So, this is a win/win for me.

Along with this script, there is other script goodness that I take advantage of with this fabulous client. Listed below:

  • Query the server to see who is away and who is not by running /anames. Prints out a list similar to /anames, but gives those whore are marked as away a different brightness to their nick.
  • Because I'm a microblogging nerd, I like to know in my status bar how many characters I've currently typed before I hit enter, to know whether or not I'm under the 140 character limit. Works like a charm, character-by-character.
  • This script rocks! Allows me to do search and replace with text in my client. I use it mainly for the Jabber bot. See this post for more details.
  • You can put the number of people in a channel, including the number of ops, halfops, voices, etc in your status bar.
  • This puts a trackbar on your window where you last were in the conversation last time you were watching it. Very useful to pick back up where you left off in a conversation when you return to that window.
  • Using GNU screen is solid with irssi. However, when I am away, I want to mark myself away with the server. So, all I have to do is detach screen, and this script will mark me away with my configured away message. No public announcements either.

Of course, I use a few others, such as the bitlbee scripts, but these are the heavy hitters. Must-haves for any serious irssi user/hacker.

{ 1 } Comments