JWM Configuration

Configuration settings for JWM v2.3.
For JWM v2.2, see JWM v2.2 Configuration.
For a list of changes since JWM v2.2, see the JWM v2.3 Release Notes.

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 or the output of programs may be included under the JWM tag via the Include tag. The text of this tag specifies the location of additional configuration file or a program to execute. The path may be relative to the location JWM was started or be an absolute path. The file at that location is read. If the text starts with exec:, then the specified program is run. The format of the configuration file is the same as the main configuration file.
The ability to use the output of a program is new as of JWM v2.3.5.

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
aerosnap Enable auto-maximization. New in v2.3.6.
border Enables the border on windows in this group.
centered Center windows in this group upon initial placement instead of using cascaded placement.
constrain Prevent clients in this group from moving off-screen.
desktop:# The desktop on which windows in this group will be started.
drag Do not pass mouse events to the window. Instead, use the mouse to move/resize the window. New in v2.3.4.
fixed Fix the windows in this group to the current desktop. This will cause the desktop to change when the window is raised rather than the default behavior of moving the window to the current desktop. New in v2.3.5.
hmax Make windows in this group maximize horizontally by default.
icon:icon The icon to be used for windows in this group.
iignore Ignore the increment size hint when maximizing windows in this group.
layer:layer The layer on which windows in this group will be started. Valid ooptions are below, normal, and above.
maximized Make windows in this group maximized.
minimized Make windows in this group minimized.
noborder Disables the border for windows in this group.
noclose Hides the close button for windows in this group.
nodrag Disable mod1+drag for moving/resizing windows in this group. New in v2.3.6.
nofocus Prevents windows in this group from grabbing the focus when mapped.
nofullscreen Prevents windows in this group from being fullscreen.
nolist Causes the tray to ignore windows in this group.
nomax Disallows maximization for windows in this group.
nomin Disallows minimization for windows in this group.
nomove Prevents windows in this group from being moved.
nopager Causes the pager to ignore windows in this group.
noresize Prevents windows in this group from being resized.
noshade Disallows shading for windows in this group.
notitle Disables the title bar for windows in this group.
noturgent Ignore the urgent hint for windows in this group. Without this option set, JWM will flash the border of urgent windows.
opacity:# Set the opacity for windows in this group. The value is a number between 0.0 and 1.0 inclusive.
pignore Ignore program-specified initial position.
shaded Make windows in this group shaded.
sticky Make windows in this group sticky.
tiled Attempt to tile windows in this group upon initial placement. If tiled placement fails, windows will fall back to cascaded (the default) or centered if specified.
title Enables the title bar for windows in this group.
vmax Make windows in this group maximize vertically by default.

Window Style

The WindowStyle tag controls the look of window borders. This tag supports the following attribute:

Within this tag the following tags are supported.

Clock Style

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

Tray Style

The TrayStyle tag controls the look of the tray. This tag supports the following attributes:

Within this tag the following tags are supported:

Task List Style

The TaskListStyle tag controls the look of task lists. New in v2.3.6.

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. New in v2.3.6.

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). This tag supports the following attribute:

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:

ValueDescription
up Move up.
down Move down.
right Move right.
left Move left.
escape Stop a move/resize or exit a menu.
select Make a selection.
next Switch to the next window in the task list.
nextstacked Switch to the next window in the stacking order.
prev Switch to the previous window in the task list.
prevstacked Switch to the previous window in the stacking order.
close Close window.
fullscreen Toggle fullscreen.
minimize Minimize window.
maximize Maximize window.
maxv Maximize window vertically.
maxh Maximize window horizontally.
maxtop Maximize window to the top half of the screen.
maxbottom Maximize window to the bottom half of the screen.
maxleft Maximize window to the left half of the screen.
maxright Maximize window to the right half of the screen.
restore Restore maximized or minimized window (new as of version 2.3.3).
shade Shade window.
move Move window.
resize Resize window.
root:n Show root menu n.
window Show the window menu.
desktop# 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 #.
rdesktop Move one desktop to the right.
ldesktop Move one desktop to the left.
udesktop Move up one desktop.
ddesktop Move down one desktop.
sendl Send the active window left.
sendr Send the active window right.
sendu Send the active window up.
sendd Send the active window down.
exec:command Execute command.
restart Restart JWM.
exit Exit JWM.
showtray Show trays.

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

Any button other than the scroll wheel (buttons 4 and 5) on the root window will bring up the root menu unless otherwise specified via the onroot attribute of RootMenu. Scrolling up on the root window switches to the left desktop and scrolling down switches to the right desktop.

Scrolling up over the title bar will shade the window and scrolling down will unshade the window. When a menu is open, the scroll wheel will move through menu items. When over the pager, the scroll wheel will switch desktops. When over a task list, the scroll wheel will switch windows.

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
ButtonClose An icon to use for the close button on client windows instead of the default.
ButtonMax An icon to use for the maximize button on client windows instead of the default.
ButtonMaxActivve An icon to use for the maximize button on maximized client windows instead of the default.
ButtonMenu An icon to use for the menu button on client windows instead of the default. This is used if the client window does not specify an icon. New in v2.3.5.
ButtonMin An icon to use for the minimize button on client windows instead of the default.
DefaultIcon The default icon to use for windows that do not specify an icon or have one explicitly configured. New in 2.3.6.
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 mask attribute specifies the key mask that, when held, allows one to move the window by dragging it. The default is A. New in v2.3.7.
The optional coordinates attribute determines the location of the move status window. Possible values are off, corner, window, and screen (the default).
The optional delay attribute sets the delay in milliseconds before moving a window to a different desktop. Setting this to 0 disables dragging between desktops. 1000 is 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.

Home / Projects / JWM