Friday, May 28, 2010

[SW] Change modifier key for wmii

I have adopted wmii as my main WM for months and it has given pretty good experience in my daily usage. There has been one thing, however, bothering me a bit. The default modifier key of wmii is Alt, which is presented as Mod1 in wmiirc. Because Alt is a frequently used key for tools such as BASH, this default setting could cause some inconveniences. For example, when you want to move forward in BASH commands, Alt+F won't give you the expected moving but will make the working window run in full screen. Fortunately, wmii has been featured as its configurability.

In my system, which is Ubuntu 8.04, the confiuration files are located in
/etc/X11/wmii-3.5/

There are two files look like something to be the configureation file: rc.wmii and wmiirc. To make sure which one is used, use the following commands
ps aux | grep wmii | grep rc

In my case, it is the wmiirc file.

In the beginning of wmiirc, there are several lines which set the keys.
MODKEY=Mod1
UP=k
DOWN=j
LEFT=h
RIGHT=l

I set MODKEY from Mod1 to Mod4 which is the Windows key. Re-login and you can use wmii without the ``Alt conflict'' with many other programs.

No comments:

Post a Comment