ruby-wmii FAQ
This is a list of frequently asked questions regarding ruby-wmii. Feel free to add your questions by editing this page.
- Does ruby-wmii work with wmii 4?
- How can I change the key sequences for the default bindings?
- I don’t seem to have MODKEY-a -> config-help. Why is that?
- How do I change the MODKEY? I want to change it to the Win Key (Super_L in X11).
- Is there supposed to be a default wmiirc-config.rb file? I don’t seem to have one of these either.
- Your question here
Does ruby-wmii work with wmii 4?
ruby-wmii works only with wmii 3.0 and 3.1 as of 0.3.0. I will soon start working on making it compatible with wmii 4.
Keep in mind that wmii 4 is a moving target, quite unstable at times, so it’s probably best to stay with 3.1 for the time being.
How can I change the key sequences for the default bindings?
You can pass additional arguments to use_binding to override the default sequences in your .wmii-3/wmiirc-config.rb:
(0..9).each{|k| use_binding "numeric-jump-#{k}", "MODKEY2-#{k}" }
You can find more information about how to configure ruby-wmii ~/.wmii-3/wmiirc (the long heredoc at the top) or typing MODKEY-a (ALT-a by default) -> config-help.
I don’t seem to have MODKEY-a -> config-help. Why is that?
There are a few possible causes; in no particular order:
- the standard plugins might be missing; please make sure that $HOME/.wmii-3/plugins/standard-plugin.rb exists and is readable
- the config-help internal action relies on xmessage to display the message; it won’t do anything if it’s missing
- are you using a recent ruby-wmii release? config-help was introduced in ruby-wmii 0.3.0
If everything fails, you can still find the config-help message in wmiirc, near the beginning, in the WMIIRC_HELP_MESSAGE heredoc.
How do I change the MODKEY? I want to change it to the Win Key (Super_L in X11).
There are two things to consider:
- the current modifier map
- the translations defined in your wmiirc-config.rb
Modifier map
The modified map is used to convert keycodes to the corresponding modifier keysyms; you can see the current modifier map as follows:
$ xmodmap -pm xmodmap: up to 3 keys per modifier, (keycodes in parentheses): shift Shift_L (0x32), Shift_R (0x3e) lock control Control_L (0x25), Control_R (0x6d) mod1 Alt_L (0x40), Alt_L (0x7d), Meta_L (0x9c) mod2 Num_Lock (0x4d) mod3 mod4 Super_L (0x7f), Hyper_L (0x80) mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x71), ISO_Level3_Shift (0x7c)
In this example, Super_L corresponds to Mod4.
If you want to add a new association, you can do something like
xmodmap -e "add mod3 = Menu"
which would map the Menu key to Mod3.
wmiirc-config.rb
Once you know which modifier you want (e.g. Mod4 in the above example, in order to use Super_L == Win key), you can change the binding translations in your $HOME/.wmii-3/wmiirc-config.rb. By default, there should be something like this near the top:
# Translate the following names in the on_key and use_binding definitions.
key_subs :MODKEY => :Mod1,
:MODKEY2 => :Mod4,
:LEFT => :h,
:RIGHT => :l,
:UP => :k,
:DOWN => :j
you can change it to e.g.
# Translate the following names in the on_key and use_binding definitions.
key_subs :MODKEY => :Mod4,
:MODKEY2 => :Mod5,
:LEFT => :h,
:RIGHT => :l,
:UP => :k,
:DOWN => :j
This way, all MODKEY-whatever bindings will be translated into Mod4-whatever.
You’ll have to restart wmiirc once you’ve modified wmiirc-config.rb with MODKEY-a -> wmiirc, that is (Mod1 == Alt)-a -> wmiirc because the new binding translations will only take effect after wmiirc loads the new configuration.
Is there supposed to be a default wmiirc-config.rb file? I don’t seem to have one of these either.
Please make sure you’ve installed a recent version of ruby-wmii.

Keyword(s):[ruby] [wmii] [FAQ]
References:[ruby-wmii: Ruby configuration/scripting for the wmii window manager] [Opening up my hiki wiki: bliki.rb plugin] [ruby-wmii 0.3.1: bookmark manager, generalized menus, view history…]