Getting older, not necessarily wiser!
In this post we will look at Key Bindings and Groups in JWM. These two features are more operational than they are style related. They are both very useful for setting up your own personal workflow.
Key Bindings are used to set key strokes that trigger specific functions, more commonly referred to as Key Board Shortcuts or Hot Keys.
Group Settings control how a program opens. JWM has a default behavior for opening programs, but this can be changed with group settings.
In the configuration file file a keybinding takes the following form, with the mask being optional.
<Key mask=”” key=””>action</Key>
If no mask is present then a simple key press will call the action. If a mask is added, then a combination key press will be required. Some of the more common mask options are A (Alt), C (Control), and S (Shift). The JWM home page lists all the available actions for key bindings.
Note that mouse bindings are also possible. I have not personally had a need to use these, so I am unable to comment on setting them up or their usefulness.
Lets run through an example of a key binding. In a previous post we set the menu to be triggered by a zero event which we assigned to the JWM button in the menu. Lets add a hot key to bring up the menu as well. For this example I will use “ALT” + “F1” to open the root menu.
<Key mask=”A” key=”F1”>
In this example the mask requires the “ALT” key to be pressed at the same time as the “F1” key. The action “root:0” is the same action we used for the JWM button in the menu bar. Once we save the file and reload JWM, we can press the “ALT” + “F1” keys to bring up the menu at the pointer.
The Group Settings are used to change the default behavior of how a program opens. For our example we will change the position, the desktop, and the size of the terminal window when we open the xterm program.
The firs thing we need to do is determine the WM_CLASS name of the window. To do this open a xterm instance and type xprop. A cross hair should show up on the screen. Move this over the xterm instance and left click. Information about the xterm window should be displayed. Scan through the information until you find the WM_CLASS name. It should be “xterm”,”XTerm”. Either entry will work for us.
What I want to do is open xterm on the second virtual desktop, at the center of the screen, with a width and height of 800 pixels. This is how it should look in the JWM configuration file.
We took a quick look at key bindings and groups in this post. Both of which are simple to use, and, can personalize your workflow.
While neither is essential to using JWM, both can be very useful and have many possibilities. All one has to do is explore.