EDIT: Urxvt has a bind on meta-s so I had to add to my .Xdefaults:
URxvt.searchable-scrollback: CM-s
I've using the default window change key bindings in irssi for a long time, plus some aliasse like
alias 30 /window 30
But I've had an idea recently by reading a piece of the /help bind output
/BIND ^W^C /WINDOW NEW HIDE
/BIND ^W^K /WINDOW KILL
But maybe you wish to give these binds to other people who want to use some
other key than ^W, then it would be better done as:
/BIND ^W key window
/BIND window-^C /WINDOW NEW HIDE
/BIND window-^K /WINDOW KILL
I thought that to reduce motion and have a somewhat more fluent feeling for changing windows I should find a set of prefix followed by a simple set of keys. I decided to use meta modifier, and to prefix the 'number' by the index keys for each level. I'm using a dvorak layout:
1 2 3 4 5 6 7 8 9 0
' , . p y f g c r l
a o e u i d h t n s
; q j k x b m w v z
^
And I used the order that I'm the most confortable with:
meta-h (0-20)
meta-m (21-40)
meta-g (41-60)
meta-7 (61-80)
So for each of these I add a named bind just like in the help section, here is a snippet in my .irssi/config:
{ key = "meta-h"; id = "key"; data = "win0"; },
{ key = "meta-m"; id = "key"; data = "win1"; },
{ key = "meta-g"; id = "key"; data = "win2"; },
{ key = "meta-7"; id = "key"; data = "win3"; },
I am using keys in an odd order to follow the ease of access of the keys, keeping meta pressed:
- first the home key h t n s and then the shifted index key d (1 2 3 4 5)
- then the bottom row: m w v z b (6 7 8 9 10)
- above the home keys: g c r l f (11 12 13 14 15)
- top row: 7 8 9 0 6 (16 17 18 19 20)
Each of the previously explained prefixes are used as multipliers for these numbers, allowing direct bind access for up to 80 windows.
For example, some examples:
/window 25
meta-m meta-d (prefix win1 -> and 5, here d)
/window 40
meta-m meta-6
It takes some time to get used to it, but has a nice feeling to it once into you get you muscle memory into it. Following is the full configuration for dvorak and qwerty layout.
Dvorak
{ key = "meta-h"; id = "key"; data = "win0"; },
{ key = "win0-meta-h"; id = "change_window"; data = "1"; },
{ key = "win0-meta-t"; id = "change_window"; data = "2"; },
{ key = "win0-meta-n"; id = "change_window"; data = "3"; },
{ key = "win0-meta-s"; id = "change_window"; data = "4"; },
{ key = "win0-meta-d"; id = "change_window"; data = "5"; },
{ key = "win0-meta-m"; id = "change_window"; data = "6"; },
{ key = "win0-meta-w"; id = "change_window"; data = "7"; },
{ key = "win0-meta-v"; id = "change_window"; data = "8"; },
{ key = "win0-meta-z"; id = "change_window"; data = "9"; },
{ key = "win0-meta-b"; id = "change_window"; data = "10"; },
{ key = "win0-meta-g"; id = "change_window"; data = "11"; },
{ key = "win0-meta-c"; id = "change_window"; data = "12"; },
{ key = "win0-meta-r"; id = "change_window"; data = "13"; },
{ key = "win0-meta-l"; id = "change_window"; data = "14"; },
{ key = "win0-meta-f"; id = "change_window"; data = "15"; },
{ key = "win0-meta-7"; id = "change_window"; data = "16"; },
{ key = "win0-meta-8"; id = "change_window"; data = "17"; },
{ key = "win0-meta-9"; id = "change_window"; data = "18"; },
{ key = "win0-meta-0"; id = "change_window"; data = "19"; },
{ key = "win0-meta-6"; id = "change_window"; data = "20"; },
{ key = "meta-m"; id = "key"; data = "win1"; },
{ key = "win1-meta-h"; id = "change_window"; data = "21"; },
{ key = "win1-meta-t"; id = "change_window"; data = "22"; },
{ key = "win1-meta-n"; id = "change_window"; data = "23"; },
{ key = "win1-meta-s"; id = "change_window"; data = "24"; },
{ key = "win1-meta-d"; id = "change_window"; data = "25"; },
{ key = "win1-meta-m"; id = "change_window"; data = "26"; },
{ key = "win1-meta-w"; id = "change_window"; data = "27"; },
{ key = "win1-meta-v"; id = "change_window"; data = "28"; },
{ key = "win1-meta-z"; id = "change_window"; data = "29"; },
{ key = "win1-meta-b"; id = "change_window"; data = "30"; },
{ key = "win1-meta-g"; id = "change_window"; data = "31"; },
{ key = "win1-meta-c"; id = "change_window"; data = "32"; },
{ key = "win1-meta-r"; id = "change_window"; data = "33"; },
{ key = "win1-meta-l"; id = "change_window"; data = "34"; },
{ key = "win1-meta-f"; id = "change_window"; data = "35"; },
{ key = "win1-meta-7"; id = "change_window"; data = "36"; },
{ key = "win1-meta-8"; id = "change_window"; data = "37"; },
{ key = "win1-meta-9"; id = "change_window"; data = "38"; },
{ key = "win1-meta-0"; id = "change_window"; data = "39"; },
{ key = "win1-meta-6"; id = "change_window"; data = "40"; },
{ key = "meta-g"; id = "key"; data = "win2"; },
{ key = "win2-meta-h"; id = "change_window"; data = "41"; },
{ key = "win2-meta-t"; id = "change_window"; data = "42"; },
{ key = "win2-meta-n"; id = "change_window"; data = "43"; },
{ key = "win2-meta-s"; id = "change_window"; data = "44"; },
{ key = "win2-meta-d"; id = "change_window"; data = "45"; },
{ key = "win2-meta-m"; id = "change_window"; data = "46"; },
{ key = "win2-meta-w"; id = "change_window"; data = "47"; },
{ key = "win2-meta-v"; id = "change_window"; data = "48"; },
{ key = "win2-meta-z"; id = "change_window"; data = "49"; },
{ key = "win2-meta-b"; id = "change_window"; data = "50"; },
{ key = "win2-meta-g"; id = "change_window"; data = "51"; },
{ key = "win2-meta-c"; id = "change_window"; data = "52"; },
{ key = "win2-meta-r"; id = "change_window"; data = "53"; },
{ key = "win2-meta-l"; id = "change_window"; data = "54"; },
{ key = "win2-meta-f"; id = "change_window"; data = "55"; },
{ key = "win2-meta-7"; id = "change_window"; data = "56"; },
{ key = "win2-meta-8"; id = "change_window"; data = "57"; },
{ key = "win2-meta-9"; id = "change_window"; data = "58"; },
{ key = "win2-meta-0"; id = "change_window"; data = "59"; },
{ key = "win2-meta-6"; id = "change_window"; data = "60"; },
{ key = "meta-7"; id = "key"; data = "win3"; },
{ key = "win3-meta-h"; id = "change_window"; data = "61"; },
{ key = "win3-meta-t"; id = "change_window"; data = "62"; },
{ key = "win3-meta-n"; id = "change_window"; data = "63"; },
{ key = "win3-meta-s"; id = "change_window"; data = "64"; },
{ key = "win3-meta-d"; id = "change_window"; data = "65"; },
{ key = "win3-meta-m"; id = "change_window"; data = "66"; },
{ key = "win3-meta-w"; id = "change_window"; data = "67"; },
{ key = "win3-meta-v"; id = "change_window"; data = "68"; },
{ key = "win3-meta-z"; id = "change_window"; data = "69"; },
{ key = "win3-meta-b"; id = "change_window"; data = "70"; },
{ key = "win3-meta-g"; id = "change_window"; data = "71"; },
{ key = "win3-meta-c"; id = "change_window"; data = "72"; },
{ key = "win3-meta-r"; id = "change_window"; data = "73"; },
{ key = "win3-meta-l"; id = "change_window"; data = "74"; },
{ key = "win3-meta-f"; id = "change_window"; data = "75"; },
{ key = "win3-meta-7"; id = "change_window"; data = "76"; },
{ key = "win3-meta-8"; id = "change_window"; data = "77"; },
{ key = "win3-meta-9"; id = "change_window"; data = "78"; },
{ key = "win3-meta-0"; id = "change_window"; data = "79"; },
{ key = "win3-meta-6"; id = "change_window"; data = "80"; },
Qwerty
Layout extract:
12345 67890
qwert yuiop
asdfg hjkl;
zxcvb nm,./
Configuration (untested):
{ key = "meta-j"; id = "key"; data = "win0"; },
{ key = "win0-meta-j"; id = "change_window"; data = "1"; },
{ key = "win0-meta-k"; id = "change_window"; data = "2"; },
{ key = "win0-meta-l"; id = "change_window"; data = "3"; },
{ key = "win0-meta-;"; id = "change_window"; data = "4"; },
{ key = "win0-meta-h"; id = "change_window"; data = "5"; },
{ key = "win0-meta-m"; id = "change_window"; data = "6"; },
{ key = "win0-meta-,"; id = "change_window"; data = "7"; },
{ key = "win0-meta-."; id = "change_window"; data = "8"; },
{ key = "win0-meta-/"; id = "change_window"; data = "9"; },
{ key = "win0-meta-n"; id = "change_window"; data = "10"; },
{ key = "win0-meta-u"; id = "change_window"; data = "11"; },
{ key = "win0-meta-i"; id = "change_window"; data = "12"; },
{ key = "win0-meta-o"; id = "change_window"; data = "13"; },
{ key = "win0-meta-p"; id = "change_window"; data = "14"; },
{ key = "win0-meta-y"; id = "change_window"; data = "15"; },
{ key = "win0-meta-7"; id = "change_window"; data = "16"; },
{ key = "win0-meta-8"; id = "change_window"; data = "17"; },
{ key = "win0-meta-9"; id = "change_window"; data = "18"; },
{ key = "win0-meta-0"; id = "change_window"; data = "19"; },
{ key = "win0-meta-6"; id = "change_window"; data = "20"; },
{ key = "meta-m"; id = "key"; data = "win1"; },
{ key = "win0-meta-j"; id = "change_window"; data = "21"; },
{ key = "win0-meta-k"; id = "change_window"; data = "22"; },
{ key = "win0-meta-l"; id = "change_window"; data = "23"; },
{ key = "win0-meta-;"; id = "change_window"; data = "24"; },
{ key = "win0-meta-h"; id = "change_window"; data = "25"; },
{ key = "win0-meta-m"; id = "change_window"; data = "26"; },
{ key = "win0-meta-,"; id = "change_window"; data = "27"; },
{ key = "win0-meta-."; id = "change_window"; data = "28"; },
{ key = "win0-meta-/"; id = "change_window"; data = "29"; },
{ key = "win0-meta-n"; id = "change_window"; data = "30"; },
{ key = "win0-meta-u"; id = "change_window"; data = "31"; },
{ key = "win0-meta-i"; id = "change_window"; data = "32"; },
{ key = "win0-meta-o"; id = "change_window"; data = "33"; },
{ key = "win0-meta-p"; id = "change_window"; data = "34"; },
{ key = "win0-meta-y"; id = "change_window"; data = "35"; },
{ key = "win0-meta-7"; id = "change_window"; data = "36"; },
{ key = "win0-meta-8"; id = "change_window"; data = "37"; },
{ key = "win0-meta-9"; id = "change_window"; data = "38"; },
{ key = "win0-meta-0"; id = "change_window"; data = "39"; },
{ key = "win0-meta-6"; id = "change_window"; data = "40"; },
{ key = "meta-u"; id = "key"; data = "win2"; },
{ key = "win0-meta-j"; id = "change_window"; data = "41"; },
{ key = "win0-meta-k"; id = "change_window"; data = "42"; },
{ key = "win0-meta-l"; id = "change_window"; data = "43"; },
{ key = "win0-meta-;"; id = "change_window"; data = "44"; },
{ key = "win0-meta-h"; id = "change_window"; data = "45"; },
{ key = "win0-meta-m"; id = "change_window"; data = "46"; },
{ key = "win0-meta-,"; id = "change_window"; data = "47"; },
{ key = "win0-meta-."; id = "change_window"; data = "48"; },
{ key = "win0-meta-/"; id = "change_window"; data = "49"; },
{ key = "win0-meta-n"; id = "change_window"; data = "50"; },
{ key = "win0-meta-u"; id = "change_window"; data = "51"; },
{ key = "win0-meta-i"; id = "change_window"; data = "52"; },
{ key = "win0-meta-o"; id = "change_window"; data = "53"; },
{ key = "win0-meta-p"; id = "change_window"; data = "54"; },
{ key = "win0-meta-y"; id = "change_window"; data = "55"; },
{ key = "win0-meta-7"; id = "change_window"; data = "56"; },
{ key = "win0-meta-8"; id = "change_window"; data = "57"; },
{ key = "win0-meta-9"; id = "change_window"; data = "58"; },
{ key = "win0-meta-0"; id = "change_window"; data = "59"; },
{ key = "win0-meta-6"; id = "change_window"; data = "60"; },
{ key = "meta-7"; id = "key"; data = "win3"; },
{ key = "win0-meta-j"; id = "change_window"; data = "61"; },
{ key = "win0-meta-k"; id = "change_window"; data = "62"; },
{ key = "win0-meta-l"; id = "change_window"; data = "63"; },
{ key = "win0-meta-;"; id = "change_window"; data = "64"; },
{ key = "win0-meta-h"; id = "change_window"; data = "65"; },
{ key = "win0-meta-m"; id = "change_window"; data = "66"; },
{ key = "win0-meta-,"; id = "change_window"; data = "67"; },
{ key = "win0-meta-."; id = "change_window"; data = "68"; },
{ key = "win0-meta-/"; id = "change_window"; data = "69"; },
{ key = "win0-meta-n"; id = "change_window"; data = "70"; },
{ key = "win0-meta-u"; id = "change_window"; data = "71"; },
{ key = "win0-meta-i"; id = "change_window"; data = "72"; },
{ key = "win0-meta-o"; id = "change_window"; data = "73"; },
{ key = "win0-meta-p"; id = "change_window"; data = "74"; },
{ key = "win0-meta-y"; id = "change_window"; data = "75"; },
{ key = "win0-meta-7"; id = "change_window"; data = "76"; },
{ key = "win0-meta-8"; id = "change_window"; data = "77"; },
{ key = "win0-meta-9"; id = "change_window"; data = "78"; },
{ key = "win0-meta-0"; id = "change_window"; data = "79"; },
{ key = "win0-meta-6"; id = "change_window"; data = "80"; },