MAN page from Fedora 23 motif-2.3.4-10.fc23.x86_64.rpm
mwmrc
Section: Misc. Reference Manual Pages (special file)
Index NAME
mwmrc --- theMotif Window Manager Resource Description File
DESCRIPTION
The mwmrc file is a supplementary resourcefile that controls much of the behavior of the Motif window manager mwm. It contains descriptions of resources that cannot easily bewritten using standard X Window System, Version 11 resource syntax. The resourcedescription file contains entries that are referred to by X resources indefaults files (for example, /usr/share/X11/app-defaults/Mwm)or in the RESOURCE_MANAGER property on theroot window. For example, the resource description file enables you to specifydifferent types of window menus; however, an X resource is used to specifywhich of these window menus mwm should use for a particularwindow.
Location
The window manager searches for one of the following resource descriptionfiles, where $LANG is the value of the language environmenton a per-user basis:
$HOME/$LANG/.mwmrc$HOME/.mwmrc/etc/X11/mwm/$LANG/system.mwmrc/etc/X11/mwm/system.mwmrc
The first file found is the first used. If no file is found, aset of built-in specifications is used. A particular resource descriptionfile can be selected using the configFileresource. The following shows how a different resource description file canbe specified from the command line:
/usr/bin/mwm -xrm "mwm*configFile: mymwmrc"
Resource Types
The following types of resources can be described in the mwm resourcedescription file:
- Buttons
- Window manager functions can be bound (associated) with button events.
- Keys
- Window manager functions can be bound (associated) with key pressevents.
- Menus
- Menu panes can be used for the window menu and other menus posted withkey bindings and button bindings.
MWM RESOURCE DESCRIPTION FILE SYNTAX
The mwm resource description file is a standardtext file that contains items of information separated by blanks, tabs, andnew lines characters. Blank lines are ignored. Items or characters can bequoted to avoid special interpretation (for example, the comment charactercan be quoted to prevent it from being interpreted as the comment character).A quoted item can be contained in double quotes (" ").Single characters can be quoted by preceding them by the back-slash character(\). If a line ends with a back-slash, the next line is considereda continuation of that line. All text from an unquoted #to the end of the line is regarded as a comment and is not interpreted aspart of a resource description. If ! is the first characterin a line, the line is regarded as a comment.
Window Manager Functions
Window manager functions can be accessed with button and key bindings,and with window manager menus. Functions are indicated as part of the specificationsfor button and key binding sets, and menu panes. The function specificationhas the following syntax:
function = function_name [function_args]function_name = window manager functionfunction_args = {quoted_item | unquoted_item}
The following functions are supported. If a function is specified thatisn't one of the supported functions then it is interpreted by mwm as f.nop.
- f.beep
- This function causes a beep.
- f.circle_down [ icon | window]
- This function causes the window or icon that is on the top of the windowstack to be put on the bottom of the window stack (so that it is no longerobscuring any other window or icon). This function affects only those windowsand icons that are obscuring other windows and icons, or that are obscuredby other windows and icons. Secondary windows (that is, transient windows)are restacked with their associated primary window. Secondary windows alwaysstay on top of the associated primary window and there can be no other primarywindows between the secondary windows and their primary window. If anicon function argument is specified, then the functionapplies only to icons. If a window functionargument is specified then the function applies only to windows.
- f.circle_up [ icon | window]
- This function raises the window or icon on the bottom of the windowstack (so that it is not obscured by any other windows). This function affectsonly those windows and icons that are obscuring other windows and icons, orthat are obscured by other windows and icons. Secondary windows (that is,transient windows) are restacked with their associated primary window. Ifan icon function argument is specified thenthe function applies only to icons. If an windowfunction argument is specified then the function applies only to windows.
- f.exec command (or ! command)
- This function causes command to beexecuted (using the value of the $MWMSHELL or $SHELL environment variable if set; otherwise, /bin/sh ). The ! notation can be used in place of the f.exec function name.
- f.focus_color
- This function sets the colormap focus to a client window. If this functionis done in a root context, then the default colormap (setup by the X WindowSystem for the screen where mwm is running) is installedand there is no specific client window colormap focus. This function is treatedas f.nop if colormapFocusPolicyis not explicit.
- f.focus_key
- This function sets the keyboard input focus to a client window or icon.This function is treated as f.nop if keyboardFocusPolicy is not explicit or the function is executed in a root context.
- f.kill
- This function is used to close application windows. The actual processingthat occurs depends on the protocols that the application observes. The applicationlists the protocols it observes in the WM_PROTOCOLS propertyon its top level window. If the application observes the WM_DELETE_WINDOW protocol, it is sent a message that requests the window be deleted.If the application observes both WM_DELETE_WINDOW and WM_SAVE_YOURSELF, it is sent one message requesting the windowbe deleted and another message advising it to save its state. If the applicationobserves only the WM_SAVE_YOURSELFprotocol , it is sent a message advising it to save its state. After adelay (specified by the resource quitTimeout), the application'sconnection to the X server is terminated. If the application observes neitherof these protocols, its connection to the X server is terminated.
- f.lower [- client | within | freeFamily]
- This function lowers a primary window to the bottom of the global windowstack (where it obscures no other window) and lowers the secondary window(transient window or dialog box) within the client family. The arguments tothis function are mutually exclusive. The clientargument indicates the name or class of a client to lower. The name or classof a client appears in the WM_CLASS property on theclient's top-level window. If the clientargument is not specified, the context that the function was invoked in indicatesthe window or icon to lower. Specifying withinlowers the secondary window within the family (staying above the parent) butdoes not lower the client family in the global window stack. Specifying freeFamily lowers the window to the bottom of the global windowsstack from its local family stack.
- f.maximize
- This function causes a client window to be displayed with its maximumsize. Refer to the maximumClientSize, maximumMaximumSize, and limitResize resources in mwm(1).
- f.menu menu_name
- This function associates a cascading (pull-right) menu with a menupane entry or a menu with a button or key binding. The menu_name function argument identifies the menu to be used.
- f.minimize
- This function causes a client window to be minimized (iconified). Whena window is minimized with no icon box in use, and if the lowerOnIconify resource has the value True (the default), the icon is placedon the bottom of the window stack (such that it obscures no other window).If an icon box is used, then the client's icon changes to its iconified forminside the icon box. Secondary windows (that is, transient windows) are minimizedwith their associated primary window. There is only one icon for a primarywindow and all its secondary windows.
- f.move
- This function initiates an interactive move of a client window.
- f.next_cmap
- This function installs the next colormap in the list of colormaps forthe window with the colormap focus.
- f.next_key [ icon | window | transient]
- This function sets the keyboard input focus to the next window/iconin the set of windows/icons managed by the window manager (the orderingof this set is based on the stacking of windows on the screen). This functionis treated as f.nop if keyboardFocusPolicyis not explicit. The keyboard input focus is only moved to windows that donot have an associated secondary window that is application modal. If thetransient argument is specified, then transient (secondary)windows are traversed (otherwise, if only windowis specified, traversal is done only to the last focused window in a transientgroup). If an icon function argument is specified,then the function applies only to icons. If a window function argument is specified, then the function applies only towindows.
- f.nop
- This function does nothing.
- f.normalize
- This function causes a client window to be displayed with its normalsize. Secondary windows (that is, transient windows) are placed in their normalstate along with their associated primary window.
- f.normalize_and_raise
- This function causes a client window to be displayed with its normalsize and raised to the top of the window stack. Secondary windows (that is,transient windows) are placed in their normal state along with their associatedprimary window.
- f.pack_icons
- This function is used to relayout icons (based on the layout policybeing used) on the root window or in the icon box. In general this causesicons to be "packed" into the icon grid.
- f.pass_keys
- This function is used to enable/disable (toggle) processing of key bindingsfor window manager functions. When it disables key binding processing allkeys are passed on to the window with the keyboard input focus and no windowmanager functions are invoked. If the f.pass_keys functionis invoked with a key binding to disable key binding processing the same keybinding can be used to enable key binding processing.
- f.post_wmenu
- This function is used to post the window menu. If a key is used to postthe window menu and a window menu button is present, the window menu is automaticallyplaced with its top-left corner at the bottom-left corner of the window menubutton for the client window. If no window menu button is present, the windowmenu is placed at the top-left corner of the client window.
- f.prev_cmap
- This function installs the previous colormap in the list of colormapsfor the window with the colormap focus.
- f.prev_key [ icon | window | transient]
- This function sets the keyboard input focus to the previous window/iconin the set of windows/icons managed by the window manager (the orderingof this set is based on the stacking of windows on the screen). This functionis treated as f.nop if keyboardFocusPolicy is not explicit. The keyboard input focus is only moved to windowsthat do not have an associated secondary window that is application modal.If the transient argument is specified, thentransient (secondary) windows are traversed (otherwise, if only window is specified, traversal is done only to the last focused windowin a transient group). If an icon functionargument is specified then the function applies only to icons. If anwindow function argument is specified then the functionapplies only to windows.
- f.quit_mwm
- This function terminates mwm (but NOT the X window system).
- f.raise [-client | within | freeFamily]
- This function raises a primary window to the top of the global windowstack (where it is obscured by no other window) and raises the secondary window(transient window or dialog box) within the client family. The arguments tothis function are mutually exclusive. The clientargument indicates the name or class of a client to lower. If the clientis not specified, the context that the functionwas invoked in indicates the window or icon to lower. Specifying within raises the secondary window within the family but does notraise the client family in the global window stack. Specifying freeFamily raises the window to the top of its local family stackand raises the family to the top of the global window stack.
- f.raise_lower [ within | freeFamily]
- This function raises a primary window to the top of the global windowstack if it is partially obscured by another window; otherwise, it lowersthe window to the bottom of the window stack. The arguments to this functionare mutually exclusive. Specifying withinraises a secondary window within the family (staying above the parent window),if it is partially obscured by another window in the application's family;otherwise, it lowers the window to the bottom of the family stack. It hasno effect on the global window stacking order. Specifying freeFamily raises the window to the top of its local family stack, if obscuredby another window, and raises the family to the top of the global windowstack; otherwise, it lowers the window to the bottom of its local family stackand lowers the family to the bottom of the global window stack.
- f.refresh
- This function causes all windows to be redrawn.
- f.refresh_win
- This function causes a client window to be redrawn.
- f.resize
- This function initiates an interactive resize of a client window.
- f.restore
- This function restores the previous state of an icon's associated window.If a maximized window is iconified, then f.restore restoresit to its maximized state. If a normal window is iconified, then f.restore restores it to its normalized state.
- f.restore_and_raise
- This function restores the previous state of an icon's associated windowand raises the window to the top of the window stack. If a maximized windowis iconified, then f.restore_and_raise restores it toits maximized state and raises it to the top of the window stack. If a normalwindow is iconified, then f.restore_and_raise restoresit to its normalized state and raises it to the top of the window stack.
- f.restart
- This function causes mwm to be restarted (effectively terminated andre-executed). Restart is necessary for mwm to incorporatechanges in both the mwmrc file and X resources.
- f.screen [ next | prev | back | screen_number]
- This function causes the pointer to be warp to a specific screen numberor to the next, previous, or last visited (back)screen. The arguments to this function are mutually exclusive. Thescreen_number argument indicates the screen numberthat the pointer is to be warped. Screens are numbered starting from screen0. Specifying next cause the pointer to warpto the next managed screen (skipping over any unmanaged screens). Specifyingprev cause the pointer to warp to the previous managedscreen (skipping over any unmanaged screens). Specifying back cause the pointer to warp to the last visited screen.
- f.send_msg message_number
- This function sends an XClientMessageEvent of type _MOTIF_WM_MESSAGES withmessage_type set to message_number.The client message is sent only if message_numberis included in the client's _MOTIF_WM_MESSAGESproperty. A menu item label is grayed out if the menu item is used to do f.send_msg of a message that is not included in the client's _MOTIF_WM_MESSAGES property.
- f.separator
- This function causes a menu separator to be put in the menu pane atthe specified location (the label is ignored).
- f.set_behavior
- This function causes the window manager to restart with the defaultbehavior (if a custom behavior is configured) or a custom behavior (if adefault behavior is configured). By default this is bound to Shift Ctrl Alt <Key>!.
- f.title
- This function inserts a title in the menu pane at the specified location.
- f.version
- This function causes the window manager to display its release versionin a dialog box.
Function Constraints
Each function may be constrained as to which resource types can specifythe function (for example, menu pane) and also what context the functioncan be used in (for example, the function is done to the selected client window).Function contexts are:
- root
- No client window or icon has been selected as an object for the function.
- window
- A client window has been selected as an object for the function. Thisincludes the window's title bar and frame. Some functions are applied onlywhen the window is in its normalized state (for example, f.maximize) or its maximized state (for example, f.normalize).
- icon
- An icon has been selected as an object for the function.
If a function is specified in a type of resource where it is not supportedor is invoked in a context that does not apply then the function is treatedas f.nop. The following table indicates the resourcetypes and function contexts in which window manager functions apply.
Function | Contexts | Resources
|
|
f.beep | root,icon,window | button,key,menu
|
f.circle_down | root,icon,window | button,key,menu
|
f.circle_up | root,icon,window | button,key,menu
|
f.exec | root,icon,window | button,key,menu
|
f.focus_color | root,icon,window | button,key,menu
|
f.focus_key | root,icon,window | button,key,menu
|
f.kill | icon,window | button,key,menu
|
f.lower | root,icon,window | button,key,menu
|
f.maximize | icon,window(normal) | button,key,menu
|
f.menu | root,icon,window | button,key,menu
|
f.minimize | window | button,key,menu
|
f.move | icon,window | button,key,menu
|
f.next_cmap | root,icon,window | button,key,menu
|
f.next_key | root,icon,window | button,key,menu
|
f.nop | root,icon,window | button,key,menu
|
f.normalize | icon,window(maximized) | button,key,menu
|
f.normalize_and_raise | icon,window | button,key,menu
|
f.pack_icons | root,icon,window | button,key,menu
|
f.pass_keys | root,icon,window | button,key,menu
|
f.post_wmenu | root,icon,window | button,key
|
f.prev_cmap | root,icon,window | button,key,menu
|
f.prev_key | root,icon,window | button,key,menu
|
f.quit_mwm | root | button,key,menu (root only)
|
f.raise | root,icon,window | button,key,menu
|
f.raise_lower | icon,window | button,key,menu
|
f.refresh | root,icon,window | button,key,menu
|
f.refresh_win | window | button,key,menu
|
f.resize | window | button,key,menu
|
f.restart | root | button,key,menu (root only)
|
f.restore | icon,window | button,key,menu
|
f.restore_and_raise | icon,window | button,key,menu
|
f.screen | root,icon,window | button,key,menu
|
f.send_msg | icon,window | button,key,menu
|
f.separator | root,icon,window | menu
|
f.set_behavior | root,icon,window | button,key,menu
|
f.title | root,icon,window | menu
|
f.version | root,icon,window | button,key,menu
|
WINDOW MANAGER EVENT SPECIFICATION
Events are indicated as part of the specifications for button and keybinding sets, and menu panes. Button events have the following syntax:
button =~[modifier_list ]<button_event_name >modifier_list =~modifier_name { modifier_name}
The following table indicates the values that can be used for modifier_name. Note that [Alt] and [Meta] can be used interchangablyon some hardware.
Modifier | Description
|
|
Ctrl | Control Key
|
Shift | Shift Key
|
Alt | Alt Key
|
Meta | Meta Key
|
Mod1 | Modifier1
|
Mod2 | Modifier2
|
Mod3 | Modifier3
|
Mod4 | Modifier4
|
Mod5 | Modifier5
|
Locking modifiers are ignored when processing button and key bindings.The following table lists keys that are interpreted as locking modifiers.The X server may map some of these symbols to the Mod1 - Mod5 modifier keys.These keys may or may not be available on your hardware: Key Symbol Caps LockShift Lock Kana Lock Num Lock Scroll Lock The following table indicates thevalues that can be used for button_event_name.
Button | Description
|
|
Btn1Down | Button 1 Press
|
Btn1Up | Button 1 Release
|
Btn1Click | Button 1 Press and Release
|
Btn1Click2 | Button 1 Double Click
|
Btn2Down | Button 2 Press
|
Btn2Up | Button 2 Release
|
Btn2Click | Button 2 Press and Release
|
Btn2Click2 | Button 2 Double Click
|
Btn3Down | Button 3 Press
|
Btn3Up | Button 3 Release
|
Btn3Click | Button 3 Press and Release
|
Btn3Click2 | Button 3 Double Click
|
Btn4Down | Button 4 Press
|
Btn4Up | Button 4 Release
|
Btn4Click | Button 4 Press and Release
|
Btn4Click2 | Button 4 Double Click
|
Btn5Down | Button 5 Press
|
Btn5Up | Button 5 Release
|
Btn5Click | Button 5 Press and Release
|
Btn5Click2 | Button 5 Double Click
|
Key events that are used by the window manager for menu mnemonicsand for binding to window manager functions are single key presses; keyreleases are ignored. Key events have the following syntax:
key =~[modifier_list] <Key>key_namemodifier_list =~modifier_name { modifier_name}
All modifiers specified are interpreted as being exclusive (this meansthat only the specified modifiers can be present when the key event occurs).Modifiers for keys are the same as those that apply to buttons. The key_name is an X11 keysym name. Keysym names can be found in thekeysymdef.h file (remove the XK_prefix).
BUTTON BINDINGS
The buttonBindings resource value is the name ofa set of button bindings that are used to configure window manager behavior.A window manager function can be done when a button press occurs withthe pointer over a framed client window, an icon or the root window. Thecontext for indicating where the button press applies is also the contextfor invoking the window manager function when the button press is done(significant for functions that are context sensitive). The button bindingsyntax is
Buttons bindings_set_name{ button context function button context function ... button context function}
The syntax for the context specification is: context = object[| context] object = root | icon | window | title | frame | border | app The context specification indicates where the pointer must befor the button binding to be effective. For example, a context ofwindow indicates that the pointer must be over aclient window or window management frame for the button binding to be effective.The frame context is for the window managementframe around a client window (including the border and titlebar), theborder context is for the border part of the windowmanagement frame (not including the titlebar), the title context is for the title area of the window management frame,and the app context is for the applicationwindow (not including the window management frame). If an f.nop function is specified for a button binding, the button bindingis not done.
KEY BINDINGS
The keyBindings resource value is the name of a setof key bindings that are used to configure window manager behavior. Awindow manager function can be done when a particular key is pressed. Thecontext in which the key binding applies is indicated in the key binding specification.The valid contexts are the same as those that apply to button bindings. Thekey binding syntax is:
Keys bindings_set_name{ key context function key context function ... key context function}
If an f.nop function is specified for a key binding,the key binding is not done. If an f.post_wmenu or f.menu function is bound to a key, mwm automaticallyuses the same key for removing the menu from the screen after it has beenpopped up. The context specification syntax is the sameas for button bindings with one addition. The context ifkeymay be specified for binding keys that may not be available on all displays.If the key is not available and if ifkey is in the context,then reporting of the error message to the error log is suppressed. This featureis useful for networked, heterogeneous environments. For key bindings, theframe, title,border, and appcontexts are equivalent to the window context.The context for a key event is the window or icon that has the keyboard inputfocus (root if no window or icon has thekeyboard input focus).
MENU PANES
Menus can be popped up using the f.post_wmenu and f.menu window manager functions. The context for window managerfunctions that are done from a menu is root,icon or window dependingon how the menu was popped up. In the case of the window menu or menus popped up with a key binding, the location ofthe keyboard input focus indicates the context. For menus popped up usinga button binding, the context of the button binding is the context of themenu. The menu pane specification syntax is:
Menu menu_name{ label [mnemonic] [accelerator ] function label [mnemonic] [accelerator ] function ... label [mnemonic] [accelerator ] function}
Each line in the Menu specification identifiesthe label for a menu item and the function to be done if the menu item isselected. Optionally a menu button mnemonic and a menu button keyboard acceleratormay be specified. Mnemonics are functional only when the menu is posted andkeyboard traversal applies. The label may be a string ora bitmap file. The label specification has the following syntax:
label = text | bitmap_filebitmap_file = @file_nametext = quoted_item | unquoted_item
The string encoding for labels must be compatible with the menu fontthat is used. Labels are greyed out for menu items that do the f.nop function or an invalid function or a function that doesn'tapply in the current context. A mnemonic specificationhas the following syntax:
mnemonic = _ character
The first matching character in the label is underlined.If there is no matching character in the label, no mnemonicis registered with the window manager for that label. Although the character must exactly match a character in the label, the mnemonicdoes not execute if any modifier (such as Shift) is pressed with the characterkey. The accelerator specification is a key event specificationwith the same syntax as is used for key bindings to window manager functions.
INCLUDING FILES
You may include other files into your mwmrc file by using theinclude construct. For example,
INCLUDE{ /usr/local/shared/mwm.menus /home/kmt/personal/my.bindings}
causes the files named to be read in and interpreted in order as anadditional part of the mwmrc file. Include is a top-levelconstruct. It cannot be nested inside another construct.
WARNINGS
Errors that occur during the processing of the resource descriptionfile are recorded in: $HOME/.mwm/errorlog. Be sure tocheck this file if the appearance or behavior of mwmis not what you expect.
FILES
$HOME/$LANG/.mwmrc$HOME/.mwmrc/etc/X11/mwm/$LANG/system.mwmrc/etc/X11/mwm/system.mwmrc
RELATED INFORMATION
mwm(1),X(1).
Index
- NAME
- DESCRIPTION
- Location
- Resource Types
- MWM RESOURCE DESCRIPTION FILE SYNTAX
- Window Manager Functions
- Function Constraints
- WINDOW MANAGER EVENT SPECIFICATION
- BUTTON BINDINGS
- KEY BINDINGS
- MENU PANES
- INCLUDING FILES
- WARNINGS
- FILES
- RELATED INFORMATION
This document was created byman2html,using the manual pages.