KWin Rules Window Matching: Difference between revisions

From KDE Wiki Sandbox
(Created page with "=Window Matching= 350px|center The <menuchoice>Window Matching</menuchoice> tab provides a series of matching-criteria fields used to identif...")
 
mNo edit summary
Line 1: Line 1:
=Window Matching=
==Window Matching==


[[Image:kwin-window-matching.png|350px|center]]
[[Image:kwin-window-matching.png|350px|center]]

Revision as of 16:36, 1 March 2012

Window Matching

The Window Matching tab provides a series of matching-criteria fields used to identify application windows:

  • Window class (application) - match this window and all its children windows.
    • and Match whole window class
  • Window role - restrict the match to the function of the window (e.g. a main window, a chat window, etc.)
  • Window types - restrict the match to the type of window: Normal Window, Dialog Window, etc.
  • Window title - restrict the match to the title of the window.
  • Machine (hostname) - restrict the match to the host name associated with the window.
Tip
While it's possible to manually enter the above information, the preferred method is to use the Detect Window Properties button.


For each field, the following operators can be applied against the field value:

  • Unimportant
  • Exact Match - case insensitive.
  • Substring Match
  • Regular Expression - Qt's regular expressions are implemented. For additional information, web search qt regex nokia.

Detect Window Properties

The Detect Window Properties function simplifies the process of entering the matching-criteria.

  1. For the application you'd like to create a rule, start the application.
  2. Next, in the Window matching tab, set the number of seconds of delay before the Detect Window Properties function starts. The default is zero seconds.
  3. Click on Detect Window Properties and
  4. When the mouse-cursor turns to cross-hairs, place it inside the application window and left-click.
  5. A new window is presented with information about the selected window:
    • Class
    • Role
    • Type
    • Title
    • Machine (hostname)

Click the OK button to back-fill the Window Matching criteria.

By using a combination of the information, you can tailor whether a rule applies to an entire application (by Class) or a to a specific window Type within the Class - say a Toolbar.