This appendix provides the following sample files:
Mwm
.mwmrc
.Xdefaults
Example D-1 shows the Motif window manager resources you can customize for color, fonts, placement, and border decorations.
! Active border colors Mwm*activeForeground: #000000000000 Mwm*activeBackground: #9851785167AD Mwm*activeBackgroundPixmap: unspecified_pixmap Mwm*activeTopShadowColor: #AF4199C18E2E Mwm*activeTopShadowPixmap: unspecified_pixmap Mwm*activeBottomShadowColor: #529737652849 Mwm*activeBottomShadowPixmap: unspecified_pixmap Mwm*activeAutoShade: True ! ! Window manager menu colors ! This is used for color customization to match the menu colors ! to the active or inactive borders. If this is set to 0, ! the menu colors will not be changed during customization Mwm*matchMenuColors : 1 Mwm*menu*foreground: #000000000000 Mwm*menu*background: #9851785167AD Mwm*menu*backgroundPixmap: unspecified_pixmap Mwm*menu*topShadowColor: #AF4199C18E2E Mwm*menu*topShadowpixmap: unspecified_pixmap Mwm*menu*bottomShadowColor: #529737652849 Mwm*menu*bottomShadowPixmap: unspecified_pixmap ! ! Icon image and box colors Mwm*iconImageForeground: #000000000000 Mwm*iconImageBackground: #CA94AA469193 Mwm*iconImageBackgroundPixmap: unspecified_pixmap Mwm*iconImageTopShadowColor: #DC28BC3DA3D6 Mwm*iconImageTopShadowPixmap: unspecified_pixmap Mwm*iconImageBottomShadowColor: #9851785167AD Mwm*iconImageBottomShadowPixmap: unspecified_pixmap Mwm*iconImageAutoShade: True ! ! Set the trough color to set the iconbox color Mwm*iconbox.IBframe.IBsWindow.hScrollBar.TroughColor: Mwm*iconbox.IBframe.IBsWindow.vScrollBar.TroughColor: ! ! Inactive border colors Mwm*foreground: #000000000000 Mwm*background: #CA94AA469193 Mwm*backgroundPixmap: unspecified_pixmap Mwm*topShadowColor: #DC28BC3DA3D6 Mwm*topShadowPixmap: unspecified_pixmap Mwm*bottomShadowColor: #9851785167AD Mwm*bottomShadowPixmap: unspecified_pixmap Mwm*autoShade: True ! ! Matte colors Mwm*matteForeground: #000000000000 Mwm*matteBackground: #CA94AA469193 Mwm*matteTopShadowColor: #DC28BC3DA3D6 Mwm*matteTopShadowPixmap: unspecified_pixmap Mwm*matteBottomShadowColor: #9851785167AD Mwm*matteBottomShadowPixmap: unspecified_pixmap Mwm*matteAutoShade: True ! ! ! Set to greater than 0 pixels to add an additional border ! between border and the window Mwm*matteWidth: 0 ! ! Mwm fonts Mwm*fontList: -*-Menu-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 ! ! Set to Explicit to determine focus by clicking on the window ! or border ! Set to Pointer to determine focus based on the location of ! the pointer Mwm*keyboardFocusPolicy: Explicit ! ! Policy when the window with focus is minimized or removed ! if focuspolicy is explicit, set to true to give focus to ! the window with previous focus Mwm*autoKeyFocus: True ! ! Policy when the window with focus is raised ! if focuspolicy is explicit, set to true to give focus to ! the window that is raised Mwm*raiseKeyFocus: True ! ! if focuspolicy is explicit, set to true to give a window focus ! when it is restored from an icon Mwm*deiconifyKeyFocus: True ! ! Set to True to raise a window when it is given focus ! Set to False to keep the stacking order the same when a window ! is given focus Mwm*focusAutoRaise: True ! ! if focuspolicy is explicit, ! set to true to give input focus to a window when it is mapped Mwm*startupKeyFocus: True ! ! Set to True to place and size windows interactively ! false to use default placement Mwm*interactivePlacement: False ! ! Delay time to retry interactive placement if it fails Mwm*interPlaceDelay: 1000 ! ! Number of retries for interactive placement before using default ! placement Mwm*interPlaceRetries: 4 ! ! This determines default placement of window when there is ! no specification by the user ! Set to true to have Mwm stagger the positions of a window ! from the top left corner Mwm*clientAutoPlace: False ! ! Set to true to include the border when positioning a window ! Set to false to exclude the border Mwm*positionIsFrame: False ! ! Set to true to gray icons in the iconbox ! when the icons are not in the minimized state Mwm*fadeNormalIcon: True ! ! Border decorations ! Set to all for all decorations ! Set to any of the following to limit decorations: ! maximize minimize resizeh border menu title ! Set to none for no decorations Mwm*clientDecoration: all ! ! Set to True for compatibility for running XUI applications Mwm*useDECMode: True ! ! Set to True to display icon box ! Set to False to displays icons without the icon box Mwm*useIconBox: False ! Mwm*iconBoxSBDisplayPolicy: vertical ! ! Icon decorations ! Set to all or any of the following to control what is ! displayed with an icon ! activelabel label image Mwm*iconDecoration: activelabel label image ! ! Position of Icon box ! width x height + x position + y position Mwm*iconBoxGeometry: 14x1+0+2000 ! ! Size of resize border Mwm*resizeBorderWidth: 10 ! ! When moving a window, ! if this is set to True, the entire window will move ! if this is set to False, an outline will move Mwm*moveOpaque: False ! ! Set this to True to ignore the appropriate MOD keys for window ! manager operations depending on the keyboard and language Mwm*ignoreModKeys: False ! Set this to True to always ignore MOD2, MOD3, MOD4 keys for ! window ! manager operations regardless of the keyboard and ! language Mwm*ignoreAllModKeys: False ! Mwm*transientDecoration: Title resize Mwm*workspaceMenu: True ! ! How to place icons when a window is minimized ! Set to left top for top of screen left to right ! Set to left bottom for bottom of screen left to right ! Set to right top for top of screen right to left ! Set to right bottom for bottom of screen right to left ! Set to top left for left of screen top to bottom ! Set to top right for right of screen top to bottom ! Set to bottom left for left of screen bottom to top ! Set to bottom right for right of screen bottom to top Mwm*iconPlacement: Bottom Right ! ! Set to True to place icons according to iconPlacement resource ! Set to False for interactive arrangement Mwm*iconAutoPlace: True ! ! Set to numbers of pixels between the edge of screen and the ! icons Mwm*iconPlacementMargin: 1 ! ! Title for icon box Mwm*iconBoxTitle: Icon box ! Mwm*restartSettings: True ! ! Feedback information ! options are all or none or ! behavior move resize placement quit restart kill Mwm*showFeedback: behavior placement quit restart kill ! ! Resize Mwm dialog boxes to fit on screen *DXmfitToScreenPolicy: as_needed ! ! Double-click on window menu (on border of window) ! Set to true to enable double-click on window menu to "close" ! a window Mwm*wMenuButtonClick2: False
Example D-2
defines the window and root (Workspace) menus
and bindings. The Motif window manager searches for .mwmrc
in your home directory and then /usr/lib/X11/system.mwmrc
. This
can vary depending on the language and certain environment variables set for
your system. You can define your configuration file by adding the following
line in the Mwm
file located in your home directory:
Mwm*configFile: ~/.mwmrc
! ! Default bindings as defined in the configuration file Mwm*buttonBindings: DefaultButtonBindings Mwm*keyBindings: DefaultKeyBindings ! ! Definition for Window menu on the border of a window Mwm*windowMenu: DefaultWindowMenu ! ! Definition for Window menu on iconbox Mwm*iconbox*windowMenu: IconBoxMenu ! ! Definition for System menu when MB1 is pressed on the screen Mwm*systemMenu: RootMenu
The file .mwmrc
contains all window manager menu definitions
and keyboard bindings.
Table D-1
lists the available
window manager functions.
f.beep
|
f.send_msg
|
f.normalize
|
f.exec
|
f.set_behavior
|
f.refresh
|
f.prev_key
|
f.circle_down
|
f.raise
|
f.move
|
f.focus_key
|
f.dec_customize
|
f.pack_icons
|
f.maximize
|
f.focus_color
|
f.restart
|
f.nop
|
f.raise_lower
|
Example D-3
shows a sample .mwmrc
file.
! Menu descriptions ! ! ! Root Menu ! Workspace menu from MB1 on screen Menu RootMenu { "Workspace" f.title "Shuffle Up" _U f.circle_up "Shuffle Down" _D f.circle_down "Next Window" _N f.next_key "Previous Window" _v f.prev_key no-label f.separator "Pack Icons" _P f.pack_icons "Options" _O f.menu MwmCustomizeMenu no-label f.separator "Restart..." _R f.restart "Help" _H f.menu MwmHelpMenu }
! Workspace menu from Window menu Menu WorkspaceMenu { "Shuffle Up" _U f.circle_up "Shuffle Down" _D f.circle_down "Next Window" _N f.next_key "Previous Window" _v f.prev_key no-label f.separator "Pack Icons" _P f.pack_icons "Options" _O f.menu MwmCustomizeMenu no-label f.separator "Restart..." _R f.restart }
! Customize menu from window menu Menu MwmCustomizeMenu { "Workspace..." _W f.dec_customize workspace "Border..." _B f.dec_customize border "Border Colors..." _o f.dec_customize bordercolor "Icons..." _I f.dec_customize icons "Icon Colors..." _c f.dec_customize iconcolor "Matte..." _M f.dec_customize matte no-label f.separator "Apply Current Settings" _A f.dec_customize apply "Reset to Last Saved Settings" _R f.dec_customize reset "Reset to Default" _D f.dec_customize default }
! Help menu from window menu Menu MwmHelpMenu { "On Window Manager..." _W f.dec_help mwm "On Version..." _V f.dec_help version "On Terms..." _T f.dec_help terms }
! Default Window Menu ! Menu associated with window border Menu DefaultWindowMenu { "Restore" _R Alt<Key>F5 f.normalize "Move" _M Alt<Key>F7 f.move "Size" _S Alt<Key>F8 f.resize "Minimize" _n Alt<Key>F9 f.minimize "Maximize" _x Alt<Key>F10 f.maximize "Lower" _L Alt<Key>F3 f.lower no-label f.separator "Workspace" _W f.menu WorkspaceMenu "Close" _C Alt<Key>F4 f.kill "Help" _H f.menu MwmHelpMenu }
! Default Iconbox menu ! Menu associated with the icon box Menu IconBoxMenu { "Restore" _R Alt<Key>F5 f.normalize "Move" _M Alt<Key>F7 f.move "Size" _S Alt<Key>F8 f.resize "Minimize" _n Alt<Key>F9 f.minimize "Maximize" _x Alt<Key>F10 f.maximize "Lower" _L Alt<Key>F3 f.lower no-label f.separator "Workspace" _W f.menu WorkspaceMenu "Pack Icons" _P Shift Alt<Key>F7 f.pack_icons "Help" _H f.menu MwmHelpMenu } ! !-------------------------------- ------------------------------ ! ! Key bindings ! ! Keys DefaultKeyBindings { Shift<Key>Escape window|icon f.post_wmenu ! Commented out to avoid conflict with Compose space ! Meta<Key>space window|icon f.post_wmenu Meta<Key>Tab root|icon|window f.next_key Meta Shift<Key>Tab root|icon|window f.prev_key Meta<Key>Escape root|icon|window f.next_key Meta Shift<Key>Escape root|icon|window f.prev_key Meta Shift Ctrl<Key>exclam root|icon|window f.set_behavior Meta Ctrl<Key>exclam root|icon|window f.set_behavior Meta<Key>F6 window f.next_key transient Meta Shift<Key>F6 window f.prev_key transient Shift<Key>F4 root|icon|window f.menu RootMenu <Key>F4 icon f.post_wmenu } ! !--------------------------------------------------------------- ! ! Button Bindings ! ! ! Button binding for default keyboard focus policy: Explicit Buttons DefaultButtonBindings { <Btn1Down> icon|frame f.raise <Btn3Down> icon|frame f.post_wmenu <Btn1Down> root f.menu RootMenu <Btn3Down> root f.menu RootMenu <Btn1Click2> title f.minimize Shift <Btn1Click2> icon f.minimize Shift <Btn1Click> icon|frame f.lower Ctrl <Btn1Click> root|icon|frame f.next_key Ctrl Shift <Btn1Click> root|icon|frame f.prev_key Meta <Btn1Click> root|icon|frame f.next_key transient Meta Shift <Btn1Click> root|icon|frame f.prev_key transient }
.Xdefaults
Resource File
Example D-4
shows a sample .Xdefaults
file you can use to set resources for the Session Manager, Motif window
manager, and applications.
.Xdefaults
Resource File
#ifndef COLOR ! ! Black and white monitor ! *foreground: Black *background: White *highlight: Black *highlightColor: Black *topShadowColor: Black *bottomShadowColor: Black *topShadowPixmap: 25_foreground *bottomShadowPixmap: 75_foreground DXsession.display_foreground: Black DXsession.display_background: White DXsession.display_pattern: 0 DXsession.pointer_foreground: Black DXsession.pointer_background: White DXsession.pointer_shape: 0 !---------------------------------------------------------- ! #else ! #ifdef MONOCHROME_ON_COLOR ! ! ! Gray-scale monitor *foreground: gray15 *background: gray65 *highlight: grey15 *highlightColor: grey15 *topShadowColor: grey80 *bottomShadowColor: grey25 DXsession.display_foreground: grey45 DXsession.display_background: grey45 DXsession.display_pattern: 1 DXsession.pointer_foreground: Black DXsession.pointer_background: White DXsession.pointer_shape: 0 ! !---------------------------------------------------------- ! #else ! Color monitor ! *background: #CA94AA469193 *foreground: Black *highlight: #4BE0624076AE *highlightColor: #4BE0624076AE *topShadowColor: #DC28BC3DA3D6 *bottomShadowColor: #9851785167AD DXsession.display_foreground: #4BE0624076AE DXsession.display_background: #4BE0624076AE DXsession.display_pattern: 1 DXsession.pointer_foreground: Black DXsession.pointer_background: White DXsession.pointer_shape: 0 #endif #endif