Powerline and IRSSI

IRSSI is my IRC client of choice. It’s wonderfully configurable and the interface is clean and accessible. One of the other things I’ve been playing with recently is the Powerline system of prompts. Powerline uses a clever combination of colours and a special chevron character (which, unfortunately, does mean you have to patch your font. It’d be nice if the characters made it into unicode) to give a series of coloured segments on the line (see the screenshots to see what I mean).

Now, IRSSI doesn’t support powerline by itself, but I’ve been able to hack it together by using Nei’s adv_windowlist.pl script. Note: Some of the config has changed in version 0.8 of that script, so make sure you have the latest version.

Set up

Download the adv_windowlist.pl script and copy it to ~/.irssi/scripts/autorun/adv_windowlist.pl. This will allow it to start automatically, each time you start irssi. Next up enter the following commands into IRSSI (the first is only needed if you haven’t started IRSSI since copying in the script):

/run adv_windolist
/toggle adv_viewer
/statusbar window remove act
/set awl_block 2
/set awl_mouse yes
/set fancy_abbrev fancy
/format awl_display_key_active %K%4 $N  $H$C$S %8%8%n
/format awl_display_nokey_active %K%4 $N  $C %8%8%n
/format awl_display_key %w%0$N  $H$C$S%n 
/format awl_display_nokey %w%0$N  $C%n 
/format -delete awl_separator
/format -delete awl_display_header



The main work is in the awl_display_* keys. There are two pairs of keys. The _key_ lines are for when there has been activity it a channel (someone has spoken, for example) and the _nokey_ lines are for when the channel is idle. The _active lines are for the currently selected channel. They all start with a pair of foreground/background colours. The active lines then have one of the powerline chevrons followed by $N for the window number, a minor chevron and then the channel name ($H…$S starts and stops highlighting, $C is the channel name). The inactive pair is similar, but doesn’t use the major chevrons. Note carefully that there should be a space after the final “%n” on the inactive lines.

Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *