KWin Rules Window Matching/en: Difference between revisions

From KDE UserBase Wiki
(Updating to match new version of source page)
 
(Updating to match new version of source page)
 
Line 36: Line 36:
{{Note|Both <menuchoice>Exact Match</menuchoice> and <menuchoice>Substring Match</menuchoice> implement case insensitive matching.  For example, ''AB'' matches the string ''AB'', ''ab'', ''Ab'' and ''aB''.}}
{{Note|Both <menuchoice>Exact Match</menuchoice> and <menuchoice>Substring Match</menuchoice> implement case insensitive matching.  For example, ''AB'' matches the string ''AB'', ''ab'', ''Ab'' and ''aB''.}}


* <menuchoice>Regular Expression</menuchoice> - Qt's regular expressions are implemented - see [http://doc.qt.nokia.com/latest/qregexp.html pattern matching using regular expressions].
* <menuchoice>Regular Expression</menuchoice> - Qt's regular expressions are implemented - see [http://qt-project.org/doc/qt-4.8/qregexp.html pattern matching using regular expressions].
<span id="Detect_Window_Properties"></span>
<span id="Detect_Window_Properties"></span>
===Detect Window Properties===
===Detect Window Properties===

Latest revision as of 19:53, 18 July 2013



Window Matching

The Window Matching tab is used to specify the criteria KWin uses to evaluate whether the rule is applicable for a given window.

Zero (match any window) or more of the following may be specified:

  • Window class (application) - match the class.
    • Match whole window class - include matching the secondary 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 - ignore the field.
  • Exact Match
  • Substring Match

Note

Both Exact Match and Substring Match implement case insensitive matching. For example, AB matches the string AB, ab, Ab and aB.


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 (not the title bar) and left-click.
  5. A new window is presented with information about the selected window. Select the desired fields:
    • Secondary class name - some applications have a secondary class name. This value can be used to restrict windows by this value.
    • Window role
    • Window type
    • Window title

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

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