JWM Configuration

Configuration settings for JWM v2.1.

Contents

Overview

Configuration of JWM is done by editing ".jwmrc". This file is XML making it easy to edit, either by hand or programmatically. The example.jwmrc gives an example configuration file which specifies most of the options.
Before restarting JWM, it is a good idea to run "jwm -p" to make sure the configuration file is free of errors. Otherwise you may end up without a root menu.

Root Menu

The root menu in JWM is the primary way of starting programs. It also provides a way to restart or exit the window manager. Note that multiple root menus are possible. See the onroot attribute for more information. The outer-most tag is RootMenu. This tag supports the following attributes:

Within the RootMenu tag the following tags are supported:

Trays

One or more trays may be created via the Tray tag. This tag supports the following attributes:

Within the Tray tag the following tags are supported:

Includes

Other configuration files may be included under the JWM tag via the Include tag. The text of this tag specifies the location of additional configuration file. The path may be relative to the location JWM was started or be an absolute path. The file at that location is read. The format of the configuration file is the same as the main configuration file.

Group Settings

Program groups allow one to specify options which apply to a group of programs by their name and/or class. A program group is created with the Group tag. As many program groups can be created as desired. Within the Group tag the following tags are supported.

OptionDescription
border Enables the border on windows in this group.
desktop:# The desktop on which windows in this group will be started.
icon:icon The icon to be used for windows in this group.
layer:# The layer on which windows in this group will be started.
maximized Make windows in this group maximized.
hmax Make windows in this group maximize horizontally by default.
vmax Make windows in this group maximize vertically by default.
minimized Make windows in this group minimized.
noborder Disables the border for windows in this group.
nofocus Prevents windows in this group from grabbing the focus when mapped.
nolist Causes the tray to ignore windows in this group.
notitle Disables the title bar for windows in this group.
pignore Ignore program-specified initial position.
shaded Make windows in this group shaded.
sticky Make windows in this group sticky.
opacity:# Set the opacity for windows in this group. The value is a number between 0.0 and 1.0 inclusive.
title Enables the title bar for windows in this group.

Window Style

The WindowStyle tag controls the look of window borders. Within this tag the following tags are supported.

Clock Style

The ClockStyle tag controls the look of clocks on the tray. Within this tag the following tags are supported:

Tray Style

The TrayStyle tag controls the look of the tray. Within this tag the following tags are supported:

Task List Style

The TaskListStyle tag controls the look of task lists. This tag supports the following attribute:

Within this tag the following tags are supported:

Tray Button Style

The TrayButtonStyle tag controls the look of tray buttons on the tray. Within this tag, the following tags are supported.

Pager Style

The PagerStyle tag controls the look of pagers on the tray. Within this tag, the following tags are supported.

The MenuStyle tag controls the look of menus in JWM (this includes the root menu and window menus). Within this tag the following tags are supported:

The PopupStyle tag controls the look of popup windows such as those shown when the mouse sits over a task list item. This tag supports the following attributes:

Within this tag the following tags are supported:

Colors

Colors for various parts of JWM are specified within specific tags (described above). Colors may either be hex triplets in RGB format (for example, #FF0000 is red) or by a name recognized by the X server. For components that support gradients, two colors may be specified separated by a colon.

Icons

Icons for windows that don't supply an icon via the _NET_WM_ICON hint are located by searching the icon search path(s) for an icon whose name (minus the extension) matches the instance name of the window as returned in the WM_CLASS hint. If this lookup fails, a default icon is supplied. This icon will be displayed for the window on it's title bar and on the task list. Icons that are not an appropriate size will be scaled. Square icons work best.

For menu items, the icon path is searched for a match. The icon specified for a menu item must be the exact name of the icon file with extension. If no match is found, a blank area will appear where the icon should appear. If an icon is not specified for any menu item in a menu, no space will be allocated for icons.

Zero or more IconPath tags may be specified. The text of this tag is assumed to be an absolute directory path to a directory containing XPM, PNG, and/or JPEG icons. When searching for icons, if multiple paths are provided, the paths will be searched in order until a match is made. Note that icon, PNG, JPEG, and XPM support are compile-time options.

Key Bindings

Keyboard bindings in JWM are controlled by the configuration file. For example:

<?xml version="1.0"?>
<JWM>
  .
  .
  .
  <Key mask="mask" key="key">action</Key>
</JWM>

Here mask specifies the modifier keys that must be held to enable this action and key specifies the key that is to be pressed. keycode may be specified instead of key if the key code is known but the key is not (or there is no symbol for the key code). action is the action performed when this combination is pressed. The mask section is optional. It can contain any number of the following values:

Note that physical key which determines the mask can be configured using the "xmodmap" program. The key section must contain a value key string for XStringToKeysym. These values are usually what one would expect (for example, the escape key is called "Escape").
Finally, the action is the action to be performed when a key is pressed. Valid actions are:

ValueDescriptionGrabbed?
up Key to move up. No
down Key to move down. No
right Key to move right. No
left Key to move left. No
escape Key to stop a move/resize or exit a menu. No
select Key to make a selection. No
next Key to move to the next window in the task list. Yes
nextstacked Key to move to the next window in the stacking order. Yes
prev Key to move to the previous window in the task list. Yes
prevstacked Key to move to the previous window in the stacking order. Yes
close Key to close a window. Yes
miminize Key to minimize a window. Yes
maximize Key to maximize a window. Yes
shade Key to shade a window. Yes
move Key to move a window. Yes
resize Key to resize a window. Yes
root:n Key to show root menu n. Yes
window Key to show the window menu for the active window. Yes
desktop# Key to switch to a specific desktop. To use this, # must be specified in the key section. Then numbers from 1 to the number of desktops configured are substituted for #. Yes
rdesktop Key to move one desktop to the right. Yes
ldesktop Key to move one desktop to the left. Yes
udesktop Key to move up one desktop. Yes
ddesktop Key to move down one desktop. Yes
exec:command Key to execute command. Yes
restart Key to restart JWM. Yes
exit Key to exit JWM. Yes

The "grabbed" field indications whether or not the key for a specific action will be intercepted by the window manager.
Note that any binding not specified in the configuration file will not be accessible. Further, it is possible to bind multiple key combinations to the same action.

Mouse Bindings

Desktops

Virtual desktops are controlled with the Desktops tag. Within this tag the following attributes are supported.

Within the Desktops tag the following tags are supported.

Other Settings

The following tags may also be supplied.

TagDescriptionDefaultRange
DoubleClickDelta The number of pixels the mouse can move during a double click 2 0 - 32
DoubleClickSpeed The number of milliseconds between clicks for a double click 400 1 - 2000
FocusModel The focus model used by JWM sloppy click, sloppy
MoveMode The move mode. The optional coordinates attribute determines the location of the move status window. Possible values are off, corner, window, and screen (the default). opaque opaque, outline
ResizeMode The resize mode. The optional coordinates attribute determines the location of the resize status window. Possible values are off, corner, window, and screen (the default). opaque opaque, outline
RestartCommand A command to run when JWM restarts.
ShutdownCommand A command to run when JWM shuts down.
SnapMode The snap mode. An optional attribute distance specifies the distance for snapping (default is 5, range 1 - 32). border none, screen, border
StartupCommand A command to run when JWM starts.