-
Notifications
You must be signed in to change notification settings - Fork 86
Home
JWM Configuration
Configuration settings for JWM v2.2.
##Overview
Root Menu
Includes
Trays
Group Settings
Window Style
Clock Style
Tray Style
Task List Style
Tray Button Style
Pager Style
Menu Style
Popup Style
Fonts
Colors
Icons
Key Bindings
Mouse Bindings
Desktops
Other Settings
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:
onroot
Determine which buttons on the root window activate the menu. This is a list of integers specifying buttons. The default is 123. Multiple root menus may be used by specifying different buttons to activate them. Valid values in this list are 0 to 9. The usual mouse buttons are 1 for the left button, 2 for the middle button, 3 for the right button, and 4 and 5 for the scroll wheel. Therefore, accessing root menus that are assigned to buttons 0, 6, 7, 8, or 9 will typically require the use of a tray button or key binding.
- height The height of each menu item in pixels. 0 indicates that the height of the font will determine the height. The default is 0.
- label The label to display at the top of the menu. The default is JWM.
- labeled Determines if a label appears at the top of the menu. Either true or false. The default is false.
Within the RootMenu tag the following tags are supported:
Menu
This tag creates a submenu item. Any of the tags allowed within the RootMenu tag, including Menu, are allowed within this tag. The Menu tag supports the following attributes:
-
height The height of each menu item in pixels. 0 indicates that the height of the font will determine the height. The default is inherited from the parent menu.
-
label The label to use for this menu. No default.
-
icon The icon to use for this menu. No default.
-
labeled Determines if a label appears at the top of the menu. The default is false.
** Include** Include the contents of a file or the output of a program into the menu structure. The file (or program output) must start with a JWM tag containing one or more items to be contained within the menu. A file is specified by the text of the tag. If the text starts with exec: then the output of the specified executable is used.
Program The Program tag provides a way to start external programs. The text of this tag indicates the command used to start the program. The following attributes are supported:
- label The label to display. The default is the text of the tag.
- icon The icon to use. No default.
Separator This tag simply puts a line in the menu allowing menu divisions. No text or attributes are used.
Desktops This tag adds a desktop menu. This is a menu with a list of desktops which can be selected to change the current desktop. The following attributes are supported:
- label The label to use for the menu. The default is Desktops.
- icon The icon to use for this menu. No default.
SendTo Add a "send to" menu to the menu. After selecting an item from this menu, a window may be selected to send that window to the selected desktop. The following attributes are supported:
- label The label to use for the menu. The default is SendTo.
- icon The icon to use for this menu. No default.
** Stick** Add stick/unstick window operation to the menu. After selecting this item, a window may be selected to toggle the sticky state of that window. The following attributes are supported:
- label The label to use for the menu. The default is Stick.
- icon The icon to use for this menu. No default.
** Maximize** Add maximize window operation to the menu. After selecting this item, a window may be selected to toggle the maximized state of that window. The following attributes are supported:
- label The label to use for the menu. The default is Maximize.
- icon The icon to use for this menu. No default.
Minimize Add minimize window operation to the menu. After selecting this item, a window may be selected to minimize that window. The following attributes are supported:
- label The label to use for the menu. The default is Minimize.
- icon The icon to use for this menu. No default.
** Shade** Add shade/unshade window operation to the menu. After selecting this item, a window may be selected to toggle the shaded state of that window. The following attributes are supported:
- label The label to use for the menu. The default is Shade.
- icon The icon to use for this menu. No default.
Move Add move window operation to the menu. After selecting this item, a window may be selected to move that window. The following attributes are supported:
- label The label to use for the menu. The default is Move.
- icon The icon to use for this menu. No default.
Resize Add resize window operation to the menu. After selecting this item, a window may be selected to resize that window. The following attributes are supported:
- label The label to use for the menu. The default is Resize.
- icon The icon to use for this menu. No default.
Kill Add kill window operation to the menu. After selecting this item, a window may be selected to kill that window. The following attributes are supported:
- label The label to use for the menu. The default is Kill.
- icon The icon to use for this menu. No default.
Close Add close window operation to the menu. After selecting this item, a window may be selected to close that window. The following attributes are supported:
- label The label to use for the menu. The default is Close.
- icon The icon to use for this menu. No default.
Restart This tag adds a menu item to restart the window manager. The following attributes are supported:
- label The label to use. The default is Restart.
- icon The icon to use. No default.
Exit This tag adds a menu item to exit the window manager. If text is included in this tag it will be interpreted as a command to run when JWM exits. This can be used to start another window manager. The following attributes are supported:
- label The label to use. The default is Exit.
- icon The icon to use. No default.
- confirm Determine if a confirm dialog appears before exiting. The default is true. Note that confirm dialogs can be completely disabled at compile-time.
###Trays
One or more trays may be created via the Tray tag. This tag supports the following attributes:
-
autohide Determine if the tray hides itself when not activated. Either true or false. The default is false.
-
x The x-coordinate of the tray. This may be negative to indicate an offset from the right of the screen.
-
y The y-coordinate of the tray. This may be negative to indicate an offset from the bottom of the screen.
-
width The width of the tray. 0 indicates that the tray should compute an optimal width depending on what it contains and the layout. 0 is the default.
-
height The height of the tray. 0 indicates that the tray should compute an optimal height depending on what it contains and the layout. 0 is the default.
-
border The width of the border. The default is 1. Valid values are between 0 and 32 inclusive.
-
layer The layer of the tray. The default is above. Valid values are below, normal, and above.
-
layout The layout of the tray. The default is horizontal. Possible values are horizontal and vertical.
-
halign The horizontal alignment of the tray. The default is fixed. Possible values are fixed, left, center, and right.
-
valign The vertical alignment of the tray. The default is fixed. Possible values are fixed, top, center, and bottom.
Within the Tray tag the following tags are supported:
Clock Add a clock to the tray. The text of this tag may specify a command to run when the clock is clicked. This tag supports the following attributes:
- format The clock format. See strftime(3) for more information. The default is %I:%M %p.
- zone The clock time zone. See tzset(3) for more information. This defaults to the local time zone.
- width The width to use. 0 indicates that the width should be determined from the tray and the font used. The default is 0.
- height The height to use. 0 indicates that the height should be determined from the tray and the font used. The default is 0.
Dock Add a dock for system notifications. This can be used by those programs that use the _NET_SYSTEM_TRAY_Sn selection. The size of the Dock is dynamic based on the size of the tray and the number of items contained. Only one Dock is allowed per instance of JWM. This tag supports the following attribute:
- width The minimum width of items in the dock. The default is 0.
Pager Add a pager to the tray. This tag supports the following attributes:
- width The width of the pager. 0 indicates that the width should be determined from the tray. The default is 0.
- height The height of the pager. 0 indicates that the height should be determined from the tray. The default is 0.
Spacer Add empty space to the tray. This tag supports the following attributes:
- width The width of the spacer. 0 indicates that the width should be determined from the tray. The default is 0.
- height The height of the spacer. 0 indicates that the height should be determined from the tray. The default is 0.
Swallow Swallow a program into the tray. The text of this tag gives the command to run. This tag supports the following attributes:
- name The name of the program to swallow. This attribute is required since this is how JWM finds the program to swallow.
- width The width of the swallowed program. 0 indicates that the width should be determined from the tray and size requested from the program. The default is 0.
- height The height of the swallowed program. 0 indicates that the height should be determined from the tray and size requested from the program. The default is 0.
TaskList Add a task list to the tray. This tag supports the following attributes:
- border Determines if items in the task list have a border. Either true or false. The default is true.
- maxwidth The maximum width of an item in the task list. 0 indicates no maximum. The default is 0.
TrayButton Add a button to the tray. This tag supports the following attributes:
- border Determines if this button has a border. Either true or false. The default is true.
- label A label to display. No default.
- icon An icon to display. No default.
- popup Text to display in a popup. This defaults to the label. The text of this tag determines what the button does:
exec:program
Execute program.
showdesktop
Minimize all windows on the current desktop.
root:n
Show root menu n. The default action is "root:1".
###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.
Name The window name of a program to match to be in this group (the first string in WM_CLASS). This field is parsed as an extended POSIX regular expression (see regex(7) for more information). If one or more Name tags is specified, at least one must be matched. Class The window class for a program to match to be in this group (the second string in WM_CLASS). This field is parsed as an extended POSIX regular expression (see regex(7) for more information). If one or more Class tags is specified, at least one must be matched. Option A option for this group. The table below lists possible options.
Option | Description |
---|---|
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. |
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. |
nofocus | Prevents windows in this group from grabbing the focus when mapped. |
nolist | Causes the tray to ignore windows in this group. |
nopager | Causes the pager to ignore windows in this group. |
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. Within this tag the following tags are supported.
Font The font used for title bars. See Fonts.
Width The width of window borders in pixels. The default is 4, the minimum is 1, and the maximum is 128.
Height The height of window title bars in pixels. The default is 20, the minimum is 2, and the maximum is 256.
** Active** The colors/opacity used for the active window. See Colors. Within this tag the following tags are supported.
Text The color of text on the title bar.
Title The color of the title bar (gradients are supported).
Opacity The opacity of the window. This is a floating point value between 0.0 and 1.0. Note that a composite manager, such as xcompmgr, is required for this.
Outline The color of the window outline.
Inactive The colors/opacity used for inactive windows. The tags supported here are the same as those supported for Active.
###Clock Style
The ClockStyle tag controls the look of clocks on the tray. Within this tag the following tags are supported:
Font The font to use. See Fonts. Inherited from TrayStyle by default.
Background The background color. See Colors. Inherited from TrayStyle by default.
Foreground The text color. See Colors. Inherited from TrayStyle by default.
###Tray Style
The TrayStyle tag controls the look of the tray. Within this tag the following tags are supported:
Font The default tray font. See Fonts.
Background The default background color. See Colors.
Foreground The default foreground color. See Colors.
ActiveBackground The default active background color for items on the tray. See Colors.
ActiveForeground The default active foreground color for items on the tray. See Colors.
Opacity The opacity of the window. This is a floating point value between 0.0 and 1.0. Note that a composite manager, such as xcompmgr, is required for this.
###Task List Style
The TaskListStyle tag controls the look of task lists. This tag supports the following attribute:
- insert This determines how new items are added to the task list. Valid options are left and right. The default is right.
Within this tag the following tags are supported:
Font The font used for program names. Inherited from TrayStyle by default. See Fonts.
Foreground The foreground color of the task list. Inherited from TrayStyle by default. See Colors.
Background The background color of the task list. Gradients are supported. Inherited from TrayStyle by default. See Colors.
ActiveForeground The foreground color of an active item on the task list. Inherited from TrayStyle by default. See Colors.
ActiveBackground The background color of an active item on the task list. Gradients are supported. Inherited from TrayStyle by default. See Colors.
###Tray Button Style
The TrayButtonStyle tag controls the look of tray buttons on the tray. Within this tag, the following tags are supported.
Font The font used for tray button labels. Inherited from TrayStyle by default. See Fonts.
Foreground The foreground color for tray button labels. Inherited from TrayStyle by default. See Colors.
Background The background color of tray buttons. Gradients are supported. Inherited from TrayStyle by default. See Colors.
ActiveForeground The foreground color of pressed tray buttons. Inherited from TrayStyle by default. See Colors.
ActiveBackground The background color of pressed tray buttons. Gradients are supported. Inherited from TrayStyle by default. See Colors.
###Pager Style
The PagerStyle tag controls the look of pagers on the tray. Within this tag, the following tags are supported.
Outline The color of the outline around windows shown in the pager. See Colors.
Foreground The color of inactive windows shown in the pager. See Colors.
Background The background of inactive desktops shown in the pager. See Colors.
ActiveForeground The color of active windows shown in the pager. See Colors.
ActiveBackground The color of active desktops shown in the pager. See Colors.
###Menu Style
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:
Font The font used on menus. See Fonts.
Foreground The text color of inactive menu items. See Colors.
Background The background color of inactive menu items. See Colors.
ActiveForeground The text color of active menu items. See Colors.
ActiveBackground Text background color of active menu items. Gradients are supported. See Colors.
Opacity The opacity of the window. This is a floating point value between 0.0 and 1.0. Note that a composite manager, such as xcompmgr, is required for this.
###Popup Style
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:
- enabled Determine if popups are enabled. Possible values are true and false. The default is true.
- delay The delay in milliseconds before popups activate. The default is 600.
Within this tag the following tags are supported:
Font The font to use. See Fonts.
Outline The outline color of the window. See Colors.
Foreground The text color. See Colors.
Background The background color of the window. See Colors.
##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:
A - Alt (mod1)
C - Control
S - Shift
1 - mod1
2 - mod2
3 - mod3
4 - mod4
5 - mod5
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:
Value | Description | Grabbed? |
---|---|---|
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 | |
fullscreen Key to toggle fullscreen. | 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 |
showtray | Key to show trays. | 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
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.
Button 1 (typically the left button) Over the border, dragging resizes the window. Over the title bar, dragging moves the window and double clicking toggles the maximized state. Over the menu button, clicking shows the menu. Over the minimize button, clicking minimizes the window. Over the maximize button, clicking toggles between maximized and normal. Over the close button, clicking closes the window.
Button 2 (typically the middle button) Over the maximize button, clicking toggles between vertically maximized and normal. Anywhere else on a window border, dragging while holding button 2 will move the window.
Button 3 (typically the right button) Over the border, clicking shows the window menu. Over the minimize button, clicking toggles between shaded and unshaded. Over the maximize button, clicking toggles between horizontally maximized and normal. Over the close button, clicking closes the window. Over the pager, dragging with button 3 will move a window.
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.
- width The number of virtual desktops in the horizontal direction. The default is 4.
- height The number of virtual desktops in the vertical direction. The default is 1.
Within the Desktops tag the following tags are supported.
Background The default background for desktops. The type attribute determines the type of background and the text contained within this tag is the value. Valid types are:
-
solid A solid color. See Colors. This is the default.
-
gradient A gradient color. See Colors.
-
image A stretched image.
-
tile A tiled image.
-
A scaled image. Like image, but the aspect ratio of the image is preserved.
scale
-
command A command to be run for setting the background.
Desktop Desktop-specific data. The name attribute may be specified to name the desktop (the default is the desktop number). Within this tag, a Background tag may be specified for a desktop-specific background. See Background above for more information.
Other Settings
The following tags may also be supplied.
Tag| Description |Default| Range ------|--|--| 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. ButtonMin | An icon to use for the minimize button on client windows instead of the default. 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.|screen| 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.