Image of the glider from the Game of Life by John Conway
Skip to content

Static Windows In Irssi

My wife and I have A LOT of DVDs. As any normal logic-based person would do, we categorized the movies alphabetically in ascending order. As our collection grew, we added movies in their appropriate position. Unfortunately, due to the nature of our shelving, this meant taking large chunks of movies, and moving them in masse, to make room for a movie in the "B" section, a movie in the "G" section, a few movies in the "L" section, a couple movies in the "R" section and a movie in the "W" section.

As the collection grew, this grew more and more tedious, until I discovered a simple solution to the problem. Rather than keep the movies back-to-back from A to Z, throw in spaces at periodic points through the alphabet to account for growth. In other words, put some space between sections "F" and "G" to allow for 5 DVDs growth in A-F. Put more space between sections "L and "M" to allow growth for 5 DVDs in G-L. Follow this through the remainder of the alphabet, and sanity has once again entered your DVD collection.

Nothing is more annoying than automatic, especially when automatic is random. I don't like DHCP, as such, all my IP addresses at home are statically assigned. I don't like automatic transmissions, rather, I prefer to have granular control over my vehicle. Further, I don't like the automatic window numbering of Irssi. I would much prefer to have all my windows stay in static locations, regardless of whether or not a join or leave a channel. Just because I close a window, doesn't mean I want all of my windows there after to be renumbered. I've been an Irssi user now for nearly 2 years, and I had no idea that static windows existed until today.

So, with this news, suppose you are in 25 channels. You would like to "categorize" your windows in such a manner that is consistent with the existing channels. For example, maybe you are in 6 ubuntu channels, 5 generic support channels, 7 local channels (LUGs, user groups, etc), and 7 private messages. Further, let's say you have the categorized together as follows:

1: status
2: &bitlee
3-8: ubuntu channels
9-13: generic support channels
14-20: local channels
21-27: private messages

That's a fairly clean irssi window list. However, what happens if you want to join a new ubuntu channel? Then, by default, it becomes the last window. So, in our example, it would be window 28. Well, now our list is fragmented. I want all the ubuntu channels together. So, I add it to the Ubuntu window group. However, this has now pushed all of my support channels down by one: My new window list would be as follows:

1: status
2: &bitlee
3-9: ubuntu channels
10-14: generic support channels
15-21: local channels
22-28: private messages

If #irssi was at location number 13, it has now been moved to window location 14. This can be annoying when trying to remember what channel number belongs to what channel, especially if I visit the channel often.

Further, what happens when I leave a channel, or more? All the windows are shifted accordingly, getting renumbered yet again. The new window scheme could be as follows:

1: status
2: &bitlee
3-9: ubuntu channels
10-13: generic support channels
14-19: local channels
20-26: private messages

Talk about insanity! Wouldn't it be nice if I could have space between groups to allow for growth and shrinkage, without affecting the placement of the rest of the windows, just like my DVDs? Wouldn't it be nice if I could have my windows organized as follows:

1: status
2: &bitlee
3-9: ubuntu channels
21-25: generic support channels
31-37: local channels
41-47: private messages

In other words, there are now "gaps" between my windows, which allows for growth, without affecting the other windows. Further, if I leave a channel, I don't want it affecting the others. So, the question remains now, how do we set this up? Luckily, I just need to change an Irssi setting, then I can start my window numbering. The first thing I need to do is turn off automatic window renumbering. I can run the following command from within Irssi:

/set windows_auto_renumber off

With that "feature" turned off, I can now focus on sending my windows to their appropriate spots. If ##jabber was in window 10, but I want to send it to window 21, I can issue the following command (assuming I'm already at the ##jabber window):

/window number 21

With "/window number", I can send any window to any number in my session, thus giving me the ability to create "gaps" between my windows allowing for growth. Further, now when I close a window or leave a channel, it won't affect the windows following it by renumbering them.

Don't forget to save your changes to the config file:


Finally, window categorization sanity! That made my day! Further, if you take advantage of saving your layout, then, when joining previously "remembered" channels, it will go in it's previous position. This can be done with:

/layout save


{ 4 } Comments