Difference between revisions of "KWin Rules Window Matching"

Jump to: navigation, search
(split lists)
m (update the address)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
<languages />
 
<languages />
<translate>
+
 
  
 
__TOC__
 
__TOC__
  
</translate><span id="Window_Matching"></span><translate>
+
<translate>
  
==Window Matching==
+
==Window Matching== <!--T:1-->
  
 +
<!--T:2-->
 
[[Image:kwin-window-matching.png|350px|center]]
 
[[Image:kwin-window-matching.png|350px|center]]
  
 +
<!--T:3-->
 
The <menuchoice>Window Matching</menuchoice> tab is used to specify the criteria '''KWin''' uses to evaluate whether the rule is applicable for a given window.
 
The <menuchoice>Window Matching</menuchoice> tab is used to specify the criteria '''KWin''' uses to evaluate whether the rule is applicable for a given window.
  
 +
<!--T:4-->
 
Zero (match any window) or more of the following may be specified:
 
Zero (match any window) or more of the following may be specified:
  
 +
<!--T:5-->
 
* <menuchoice>Window class (application)</menuchoice> - match the class.</translate>
 
* <menuchoice>Window class (application)</menuchoice> - match the class.</translate>
 
<translate>
 
<translate>
 +
<!--T:6-->
 
** <menuchoice>Match whole window class</menuchoice> - include matching the secondary class.
 
** <menuchoice>Match whole window class</menuchoice> - include matching the secondary class.
  
 +
<!--T:7-->
 
* <menuchoice>Window role</menuchoice> - restrict the match to the function of the window (e.g. a ''main window'', a ''chat window'', etc.)
 
* <menuchoice>Window role</menuchoice> - restrict the match to the function of the window (e.g. a ''main window'', a ''chat window'', etc.)
  
 +
<!--T:8-->
 
* <menuchoice>Window types</menuchoice> - restrict the match to the type of window:  '''Normal Window''', '''Dialog Window''', etc.
 
* <menuchoice>Window types</menuchoice> - restrict the match to the type of window:  '''Normal Window''', '''Dialog Window''', etc.
  
 +
<!--T:9-->
 
* <menuchoice>Window title</menuchoice> - restrict the match to the title of the window.
 
* <menuchoice>Window title</menuchoice> - restrict the match to the title of the window.
  
 +
<!--T:10-->
 
* <menuchoice>Machine (hostname)</menuchoice> - restrict the match to the host name associated with the window.
 
* <menuchoice>Machine (hostname)</menuchoice> - restrict the match to the host name associated with the window.
  
 +
<!--T:11-->
 
{{Tip|While it's possible to manually enter the above information, the preferred method is to use the <menuchoice>Detect Window Properties</menuchoice> button.}}
 
{{Tip|While it's possible to manually enter the above information, the preferred method is to use the <menuchoice>Detect Window Properties</menuchoice> button.}}
  
 +
<!--T:12-->
 
For each field, the following operators can be applied against the field value:
 
For each field, the following operators can be applied against the field value:
  
 +
<!--T:13-->
 
* <menuchoice>Unimportant</menuchoice> - ignore the field.
 
* <menuchoice>Unimportant</menuchoice> - ignore the field.
  
 +
<!--T:14-->
 
* <menuchoice>Exact Match</menuchoice>
 
* <menuchoice>Exact Match</menuchoice>
  
 +
<!--T:15-->
 
* <menuchoice>Substring Match</menuchoice>
 
* <menuchoice>Substring Match</menuchoice>
  
 +
<!--T:16-->
 
{{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].
+
<!--T:17-->
 +
* <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].
  
 
</translate><span id="Detect_Window_Properties"></span><translate>
 
</translate><span id="Detect_Window_Properties"></span><translate>
  
===Detect Window Properties===
+
===Detect Window Properties=== <!--T:18-->
  
 +
<!--T:19-->
 
[[Image:kwin-detect-window.png|350px|center]]
 
[[Image:kwin-detect-window.png|350px|center]]
  
 +
<!--T:20-->
 
The <menuchoice>Detect Window Properties</menuchoice> function simplifies the process of entering the matching-criteria.   
 
The <menuchoice>Detect Window Properties</menuchoice> function simplifies the process of entering the matching-criteria.   
  
 +
<!--T:21-->
 
# For the application you'd like to create a rule, start the application.</translate>
 
# For the application you'd like to create a rule, start the application.</translate>
 
<translate>
 
<translate>
 +
<!--T:22-->
 
# Next, in the <menuchoice>Window matching</menuchoice> tab, set the number of seconds of delay before the <menuchoice>Detect Window Properties</menuchoice> function starts.  The default is zero seconds.</translate>
 
# Next, in the <menuchoice>Window matching</menuchoice> tab, set the number of seconds of delay before the <menuchoice>Detect Window Properties</menuchoice> function starts.  The default is zero seconds.</translate>
 
<translate>
 
<translate>
 +
<!--T:23-->
 
# Click on <menuchoice>Detect Window Properties</menuchoice> and </translate>
 
# Click on <menuchoice>Detect Window Properties</menuchoice> and </translate>
 
<translate>
 
<translate>
 +
<!--T:24-->
 
# When the mouse-cursor turns to cross-hairs, place it inside the application window (not the title bar) and left-click.</translate>
 
# When the mouse-cursor turns to cross-hairs, place it inside the application window (not the title bar) and left-click.</translate>
 
<translate>
 
<translate>
 +
<!--T:25-->
 
# A new window is presented with information about the selected window.  Select the desired fields:</translate>
 
# A new window is presented with information about the selected window.  Select the desired fields:</translate>
 
<translate>
 
<translate>
 +
<!--T:26-->
 
#* '''Secondary class name''' - some applications have a secondary class name.  This value can be used to restrict windows by this value.</translate>
 
#* '''Secondary class name''' - some applications have a secondary class name.  This value can be used to restrict windows by this value.</translate>
 
<translate>
 
<translate>
 +
<!--T:27-->
 
#* '''Window role'''</translate>
 
#* '''Window role'''</translate>
 
<translate>
 
<translate>
 +
<!--T:28-->
 
#* '''Window type'''</translate>
 
#* '''Window type'''</translate>
 
<translate>
 
<translate>
 +
<!--T:29-->
 
#* '''Window title'''
 
#* '''Window title'''
  
 +
<!--T:30-->
 
Click the <menuchoice>OK</menuchoice> button to back-fill the <menuchoice>Window Matching</menuchoice> criteria.
 
Click the <menuchoice>OK</menuchoice> button to back-fill the <menuchoice>Window Matching</menuchoice> criteria.
  
 +
<!--T:31-->
 
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'''.
 
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'''.
 +
 +
<!--T:32-->
 +
[[Category: Desktop]]
 +
[[Category:Tutorials]]
  
 
</translate>
 
</translate>

Latest revision as of 19:52, 18 July 2013

Other languages:
English • ‎dansk • ‎українська



Window Matching

Kwin-window-matching.png

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.
Ktip.png
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-box-icon.png
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

Kwin-detect-window.png

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.


This page was last edited on 18 July 2013, at 19:52. Content is available under Creative Commons License SA 4.0 unless otherwise noted.