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 the wmii 3.6 snapshots?
- How can I change the key sequences for the default bindings?
- I don't seem to have MODKEY-a -> config-help. Why is that?
- I've ran the install script, but nothing happens, and there's no wmiirc-config.rb?
- 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.
- How do I display/create 2 columns on the screen at the same time?
- How do I use a ttf font as my main font?
- Your question here
Does ruby-wmii work with the wmii 3.6 snapshots?
Latest news [2007-12-04] ruby-wmii updated for use with wmii 3.6 The previous code has been moved to the -3.1 branches, and both head and branch-ruby-ixp work with 3.6. Still no tarball release, and the documentation on this site has yet to be updated. The standard plugins are being converted (some bugs remain), 3rd party plugins might require modifications.
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.
I've ran the install script, but nothing happens, and there's no wmiirc-config.rb?
Make sure you have the latest version of ruby-wmii. Make sure that ~/.wmii-3/wmiirc is executable (chmod 755 ~/.wmii-3/wmiirc to make it executable). The config file is generated the first time you run ruby-wmii.
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. The file is automatically generated for you when you first run wmii after having installed ruby-wmii. Also make sure that your local wmiirc is executable.
How do I display/create 2 columns on the screen at the same time?
Just move a window to the left/right, and a new column will be created. With the default bindings, Alt-Shift-h would move the current client to the left (Alt-Shift-l to the right), leaving other windows in the 'old' column. If you use a pointing device (ugh), Alt+left-button-dragging to left/right-hand side of the screen will also work.
How do I use a ttf font as my main font?
I can switch to some fonts with lines like this (generated while picking fonts in xmms):
font "-adobe-helvetica-medium-r-*-*-12-*"
but I am currently limited to those that xmms can see/use. <Some examples of ttf fonts here would be great>
Have you tried to pick the fonts with xfontsel? I personally like the proggy fonts; I use -windows-proggycleansz-medium-r-normal--13-80-96-96-c-70-iso8859-1 for my console and wmii. -- mfp
Keyword(s):[ruby] [wmii] [FAQ]
References:[ruby-wmii 0.3.1: bookmark manager, generalized menus, view history...] [Opening up my hiki wiki: bliki.rb plugin] [ruby-wmii: Ruby configuration/scripting for the wmii window manager]