The K Window Manager Handbook: Configuration
Description: KDE Window manager
Keywords: KDE, window manager

Next Previous Table of Contents

### 3. Configuration

kwm can be configured using the KDE Control Center (application starter > KDE Control Center). Open the Windows tree to work with the various configuration options. To configure virtual desktops, open the Applications tree and choose Panel.

For those who prefer to edit a configuration file, this section explains the options in the `kwmrc` file, located in ~/.kde/share/config.

### 3.1 kwmrc

The kwmrc configuration file is divided into the following sections:

- Buttons
- General
- Session
- Desktop
- Decoration
- Focus

#### [Buttons]

This section controls placement of window control buttons in the titlebar. It contains lines of the form
ButtonX=button-name
where X is a letter A-F, and button-name is one of `Menu, Sticky, Iconify, Maximize, Close, Off`. Buttons A, B, and C appear on the left-hand side of the window title, and D, E, and F appear on the right-hand side.

#### [General]

This section defines a number of miscellaneous configuration items:

- AltTabStyle=`KDE|CDE` (default is KDE)
  CDE style AltTab-Feature to be usable with the classic focus policies. The CDE style is default with the classic focus policies, since KDE style does not make much sense under these circumstances. For all other focus policies you may choose the style.
- AutoRaise=value (in milliseconds)
  If `FocusPolicy` is `FocusFollowMouse`, this item determines the delay between the time a window gains focus when the mouse enters it and the time the window is raised to the top.

- BorderSnapZone=value (in pixels)
  When the user is positioning a window, and one of the window borders approaches the desktop border, the window will snap to the border. value determines how close the window must be to the desktop border to snap to it.

- Button3Grab=`on|off`
  When `off`, window operations involving the right mouse button are disabled so that application windows can receive right mouse button events.

- ControlTab=`on|off`
  When `on`, allows the user to press `Ctrl+Tab` to switch between virtual desktops.

- ElectricBorder=value (in milliseconds)
  When you have more than one desktop, the ElectricBorder feature allows you to move between them by moving the mouse to the edge of the screen. value specifies the length of time you must keep the mouse pointer positioned at the border before the desktop changes. A value of -1 disables this feature.

- ElectricBorderPointerWarp=`NoWarp|MiddleWarp|FullWarp`
  If the `ElectricBorder` option is `on`, turn this `on` to have the mouse moved to the corresponding position when the desktop changes.

- ElectricBorderNumberOfPushes=value (default is 5 pushes)
  The number of pushes within the time frame given by the `ElectricBorder` property to switch to another virtual desktop without dragging a window.

- FocusPolicy=`ClickToFocus|FocusFollowMouse|ClassicFocusFollowsMouse|ClassicSloppyFocus`
  `ClickToFocus` requires the user to click the mouse in a window to give the window focus. `FocusFollowMouse` always gives focus to the window under the mouse. `ClassicFocusFollowsMouse` no window without the mouse gets the focus. Kwm's focusFollowMouse used to put the focus to new windows or Alt-tab to allow better keyboard control.

- MaximizeOnlyVertically=`off|on`
  When `on`, this setting restricts the window maximize to the vertical direction only.

- ResizeAnimation=`1..10 (maximum speed)`
  When `on`, minimizing and maximizing windows involves graphical animation. (default is 1)

- RstartProtocol=`... (default is "rstart -v")`

- ShapeMode=`off|on`
  When ShapeMode is `on`, kwm uses user-defined pixmaps for window borders instead of the default (see below).

- ShapePixmapTop=pixmap
  ShapePixmapBottom=pixmap
  ShapePixmapLeft=pixmap
  ShapePixmapRight=pixmap
  ShapePixmapTopLeft=pixmap
  ShapePixmapTopRight=pixmap
  ShapePixmapBottomLeft=pixmap
  ShapePixmapBottomRight=pixmap
  These options specify what images are displayed at the respective sides/corners of windows when `ShapeMode` is `on`. pixmap should be the name of a pixmap file (.xpm) which must be located in share/apps/kwm/pics.

  The kwm sources include a subfolder "images", which contains an example for the the shape extensions.

- TitlebarLook=`shaded|plain|pixmap`
  This setting determines the appearance of window title bars. Choose `pixmap` to have kwm display a user-defined image in the title bar, as specified by the following items.

- TitlebarPixmapActive=pixmap
  TitlebarPixmapInactive=pixmap
  These options specify what images are displayed in titlebars of active and inactive windows, respectively, when TitleBarLook is `pixmap`.

- TitleAnimation=value (in milliseconds)
  Enabling TitleAnimation tells kwm to cause long window titles (too long to fit in the colored area of the titlebar) to slide back and forth in order to be visible. value specifies the speed of the animation. Set to 0 to disable the animation.

- TitlebarDoubleClickCommand=`winMaximize|winShade|winMove| winResize|winRestore|winIconify|winClose|winSticky| winOperations`
  This option allows you to specify what window behavior should occur when the user double-clicks the titlebar.

- TraverseAll=`on|off`
  When `on`, the `Alt-tab` operation cycles through all windows on all desktops. When `off`, `Alt-tab` cycles through windows on the current desktop only.

- WindowMoveType=`Opaque|Transparent`
  This option controls the visual feedback that occurs while the user drags a window from one place to another on the desktop. `Transparent` shows only a window outline during a drag, while `Opaque` shows the entire window.

- WindowsPlacement=`cascade|interactive|manual|random|smart`
  This option determines how kwm places windows on the desktop when they are first opened. `manual` allows the user to place the window. `interactive` takes an additional percentage value, like this:
  `WindowsPlacement=interactive,25`
  With `interactive` placement, kwm uses the `smart` placement algorithm to place the window unless the placement would overlap existing windows more than the specified percentage, in which case `manual` placement is used to allow the user to place the window. The percentage can be greater than 100. The other options let kwm place the window.

- WindowSnapZone=value (in pixels)
  When the user is positioning a window, and one of the window borders approaches the border of another window, the border of the window being positioned will snap to the other window's border. value determines how close the window must be to snap to another window's border.

#### [Session]

- proxyignore=`xemacs,xterm,...,`
  Comma delimited list of (non-KDE) applications whose application state (window properties) should not be saved when the user logs out. List the application name with any command line arguments.

#### [Desktop]

This section defines the number of virtual desktops, their names, and positions. It contains lines like the following:

- NumberOfDesktops=value
  Specifies the number of virtual desktops. At the time of writing, kwm supports up to 8 desktops.

- Desktop#[C]=name
  Specifies the name of Desktop #, for example,
  `Desktop1[C]=One`
  Desktops are numbered 1-8.

- Desktop#Region=geometry
  Specifies the geometry for Desktop #; for example,
  `Desktop1Region=101+0+923+722`

#### [Decoration]

- noDecorationTitles=,
- tinyDecorationTitles=,
- noDecorationClasses=,
- tinyDecorationClasses=,

#### [Focus]

- noFocusTitles=,
- noFocusClasses=,

Each property allows you to specify a comma separated list of regular expressions. A window whose title or class matches a specified expression will be decorated appropriately.
Note: These hints only affect NEW windows. Do not forget to call `kwmcom configure` or re-start `kwm` after you changed the kwmrc file.

Next Previous Table of Contents