Next Previous Table of Contents

### 2. Using kwm

### 2.1 Command line options

kwm provides the following command line options:

-version

  Shows the version number including the patchlevel; does not start kwm

-nosession

  Starts kwm without restoring the previous session

### 2.2 Shortcuts

Alt-Esc or Control-Esc

  "Current Session"-manager with logout-button

Alt-Tab and Alt-Shift-Tab

  Traverse the windows of the current desktop

Ctrl-Tab and Ctrl-Shift-Tab

  Traverse the virtual desktops (can be switched off in kwmrc)

Alt-F2

  Open mini command-line window

Alt-F3

  Window operation menu

Alt-F4

  Close window

Ctrl-F[1..8]

  Switch to virtual desktop

Ctrl-Alt-Esc

  Destroy window mode (cursor becomes a pirate)

### 2.3 Mouse Control

Click onto the border or the titlebar

- left mouse button activate and raise the window
- middle mouse button activate and lower the window
- right mouse button show windows operation menu if the window is active, otherwise activate it without raising

Double-click on title bar toggles maximize

Drag of the titlebar

- left mouse button moves the window and raises it
- middle mouse button moves the window without raising it

Drag of corners or edges

- left mouse button resizes the window and raises it
- middle mouse button resizes the window without raising it

The entire window

- Alt-left mouse button moves the window
- Alt-middle mouse button raises the window
- Alt-right mouse button resizes the window

Title bar buttons (configurable)

- Menu displays a list of window operations
- Sticky toggles sticky mode on/off (window stays on screen as you move from desktop to desktop)
- Iconify iconifies the window
- Maximize
  - left mouse button maximize
  - middle mouse button maximize vertically
  - right mouse button maximize horizontally
- Close closes the window (applications may ask if they have something to save)

### 2.4 Mini Command-line Window

Press `Alt-F2` to display a small command-line window. Enter a Unix shell command (the SHELL environment variable is used to determine which shell executes the command), or one of the following:

- Enter a URL to open a kfm window with the specified URL. You can omit the http:// or ftp:// if the server's name starts with www. or ftp., respectively.

- Enter `man:command` to open a kfm window displaying the Unix man page for command.

You can use the up-arrow key to recall previously entered commands. Also, you can use the tab key to complete partially entered filenames, as in many shells.

### 2.5 Commands

You can send commands to kwm with either:

`KWM::sendKWMCommand(QString)` (in KDE applications)
or
`kwmcom command` (from the command line)

This is especially of interest for kglobalshortcut developers.

At present kwm understands the following commands:

- refreshScreen refreshes the screen
- darkenScreen turns the screen dark. Careful: this one makes the desktop unresponsive to keyboard/mouse input.
- logout displays the logout dialog.
- commandLine opens the mini command-line window
- taskManager displays the "Current Session" manager.
- configure reloads configuration from kwmrc.
- winMove
  winResize
  winRestore
  winIconify
  winClose
  winShade
  winSticky
  winOperations
  These commands affect the currently active window and do pretty much what you would expect. (`winOperations` displays the window operations menu.)
- deskUnclutter
  deskCascade
  These commands reorganize windows on the desktop
- desktop[1-8] switches to the specified desktop
- desktop+1
  desktop+2
  desktop-1
  desktop-2
  desktop%2
  These commands switch between desktops. `desktop%2` toggles between an odd desktop and the next higher even number. That means between 1 and 2 or between 3 and 4. This is useful to emulate "Up" and "Down" in a virtual n*2 matrix, which is used by the KDE pager. Similarly, `desktop+2` means "Right"; `desktop-1` means "Left".

Next Previous Table of Contents