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

Irssi Windows 1 Throuh 80

It gets a bit overwhelming when you're in more channels than you have default key bindings to change windows for in Irssi- which is only 19. So what happens when you create key bindings on your keyboard for windows 20 through 40, and you now have a window 41? That was exactly the problem I ran into today, and I came up with a couple of solutions.

If you were to make key bindiings for windows 20 through 40 following the default method, you would continue to use the meta key bound with letters p for 20, a through ; for 21 through 30 and z through / for 31 through 40 (using the QWERTY layout). The only thing that you need to be aware of, is there are some default key bindings that you would be overwriting, that you may not want to. They are as follows:

meta-a active_window 
meta-b backward_word 
meta-d delete_next_word 
meta-f forward_word 
meta-k erase_completion 
meta-n scroll_forward 
meta-p scroll_backward 

If you don't mind overwriting these defaults, then you can easily create short key bindings for windows 1 through 40. But how do you create key bindings for windows 41 through 80? I thought of two solutions to this problem, one if which I think is superior.

The advantage of the meta key bindings is the ESC key can be used as well as ALT. This means it only takes 2 keystrokes to change windows: the ESC or ALT key and the key binding. I never need to hit the enter key. But how to I keep this same efficiency for windows 41 through 80? My first attempt was using the /alias command, creating /41, /42, /43, etc aliases to switch windows. While there is no limit to the number of aliases I could create with this method, it doesn't meet my efficiency need. In fact, it takes twice the amount of keystrokes (/-4-1-ENTER), thus, decreasing my efficiency by 50%. So, it doesn't meet my short key binding need.

The next solution is to use the SHIFT key in combination with the meta key to change windows, and keep the same efficiency. The idea is this: rather than ESC 1 to change to window 1, ESC SHIFT-1 to change to window 41. While a new keypress is introduced, I am still keeping the number of keystrokes to 2, keeping my efficiency in changing windows. So, if you're interested, I have keybindings, depending on if you're a QWERTY typist or a Dvorak typist which you can copy and paste into Irssi.

For QWERTY typists:

/bind meta-1 change_window 1
/bind meta-2 change_window 2
/bind meta-3 change_window 3
/bind meta-4 change_window 4
/bind meta-5 change_window 5
/bind meta-6 change_window 6
/bind meta-7 change_window 7
/bind meta-8 change_window 8
/bind meta-9 change_window 9
/bind meta-0 change_window 10
/bind meta-q change_window 11
/bind meta-w change_window 12
/bind meta-e change_window 13
/bind meta-r change_window 14
/bind meta-t change_window 15
/bind meta-y change_window 16
/bind meta-u change_window 17
/bind meta-i change_window 18
/bind meta-o change_window 19
/bind meta-p change_window 20
/bind meta-a change_window 21
/bind meta-s change_window 22
/bind meta-d change_window 23
/bind meta-f change_window 24
/bind meta-g change_window 25
/bind meta-h change_window 26
/bind meta-j change_window 27
/bind meta-k change_window 28
/bind meta-l change_window 29
/bind meta-\; change_window 30
/bind meta-z change_window 31
/bind meta-x change_window 32
/bind meta-c change_window 33
/bind meta-v change_window 34
/bind meta-b change_window 35
/bind meta-n change_window 36
/bind meta-m change_window 37
/bind meta-, change_window 38
/bind meta-. change_window 39
/bind meta-/ change_window 40
/bind meta-! change_window 41
/bind meta-@ change_window 42
/bind meta-# change_window 43
/bind meta-\$ change_window 44
/bind meta-% change_window 45
/bind meta-^ change_window 46
/bind meta-& change_window 47
/bind meta-* change_window 48
/bind meta-( change_window 49
/bind meta-) change_window 50
/bind meta-Q change_window 51
/bind meta-W change_window 52
/bind meta-E change_window 53
/bind meta-R change_window 54
/bind meta-T change_window 55
/bind meta-Y change_window 56
/bind meta-U change_window 57
/bind meta-I change_window 58
/bind meta-O change_window 59
/bind meta-P change_window 60
/bind meta-A change_window 61
/bind meta-S change_window 62
/bind meta-D change_window 63
/bind meta-F change_window 64
/bind meta-G change_window 65
/bind meta-H change_window 66
/bind meta-J change_window 67
/bind meta-K change_window 68
/bind meta-L change_window 69
/bind meta-: change_window 70
/bind meta-Z change_window 71
/bind meta-X change_window 72
/bind meta-C change_window 73
/bind meta-V change_window 74
/bind meta-B change_window 75
/bind meta-N change_window 76
/bind meta-M change_window 77
/bind meta-< change_window 78
/bind meta-> change_window 79
/bind meta-? change_window 80

For Dvorak typists:

/bind meta-1 change_window 1
/bind meta-2 change_window 2
/bind meta-3 change_window 3
/bind meta-4 change_window 4
/bind meta-5 change_window 5
/bind meta-6 change_window 6
/bind meta-7 change_window 7
/bind meta-8 change_window 8
/bind meta-9 change_window 9
/bind meta-0 change_window 10
/bind meta-' change_window 11
/bind meta-, change_window 12
/bind meta-. change_window 13
/bind meta-p change_window 14
/bind meta-y change_window 15
/bind meta-f change_window 16
/bind meta-g change_window 17
/bind meta-c change_window 18
/bind meta-r change_window 19
/bind meta-l change_window 20
/bind meta-a change_window 21
/bind meta-o change_window 22
/bind meta-e change_window 23
/bind meta-u change_window 24
/bind meta-i change_window 25
/bind meta-d change_window 26
/bind meta-h change_window 27
/bind meta-t change_window 28
/bind meta-n change_window 29
/bind meta-s change_window 30
/bind meta-\; change_window 31
/bind meta-q change_window 32
/bind meta-j change_window 33
/bind meta-k change_window 34
/bind meta-x change_window 35
/bind meta-b change_window 36
/bind meta-m change_window 37
/bind meta-w change_window 38
/bind meta-v change_window 39
/bind meta-z change_window 40
/bind meta-! change_window 41
/bind meta-@ change_window 42
/bind meta-# change_window 43
/bind meta-\$ change_window 44
/bind meta-% change_window 45
/bind meta-^ change_window 46
/bind meta-& change_window 47
/bind meta-* change_window 48
/bind meta-( change_window 49
/bind meta-) change_window 50
/bind meta-" change_window 51
/bind meta-< change_window 52
/bind meta-> change_window 53
/bind meta-P change_window 54
/bind meta-Y change_window 55
/bind meta-F change_window 56
/bind meta-G change_window 57
/bind meta-C change_window 58
/bind meta-R change_window 59
/bind meta-L change_window 60
/bind meta-A change_window 61
/bind meta-O change_window 62
/bind meta-E change_window 63
/bind meta-U change_window 64
/bind meta-I change_window 65
/bind meta-D change_window 66
/bind meta-H change_window 67
/bind meta-T change_window 68
/bind meta-N change_window 69
/bind meta-S change_window 70
/bind meta-: change_window 71
/bind meta-Q change_window 72
/bind meta-J change_window 73
/bind meta-K change_window 74
/bind meta-X change_window 75
/bind meta-B change_window 76
/bind meta-M change_window 77
/bind meta-W change_window 78
/bind meta-V change_window 79
/bind meta-Z change_window 80

Hopefully, this will be of use for IRC staff who are in tons of busy channels to keep an eye out for moderation, or for the general lurker, such as myself, that likes to help offer support when needed, has lots of questions, or needs room for private messages. Of course, if you have need for windows 81-120 and 121-160, then I think it's about time that you get out more. :)

Enjoy!

{ 6 } Comments

  1. Lasse Havelund using Firefox 2.0.0.4 on Ubuntu | July 19, 2007 at 9:36 am | Permalink

    Personally, I don't think it's any problem to navigate my 90 windows with /w . Meh.

  2. Jason using BonEcho 2.0.0.6 on GNU/Linux | October 14, 2007 at 12:14 pm | Permalink

    My only problem is that it overwrote Alt-A. :) Forgot about that one... /me rebinds to Shift-Alt-A or such (I'm only mapping 40)

  3. Myrtti using Firefox 2.0.0.6 on Ubuntu | October 17, 2007 at 1:40 am | Permalink

    psssst...
    http://koti.phnet.fi/~laxstrom/page/eng/irssi

  4. etank using Firefox 2.0.0.11 on GNU/Linux | March 15, 2008 at 7:14 am | Permalink

    Awesome. I just ran into this today.

  5. Niklas Laxström using Firefox 3.5 on GNU/Linux 64 bits | June 25, 2009 at 1:02 pm | Permalink

    New working link for the page in comment #3 is http://niklas.laxstrom.name/page/eng/irssi

  6. Anonymouse using Google Chrome 24.0.1284.2 on GNU/Linux 64 bits | October 23, 2012 at 5:04 pm | Permalink

    thanks, this is awesome

Post a Comment

Your email is never published nor shared.

Switch to our mobile site