KWin Rules Window Matching: Difference between revisions
mNo edit summary |
(split lists) |
||
Line 14: | Line 14: | ||
Zero (match any window) or more of the following may be specified: | Zero (match any window) or more of the following may be specified: | ||
* <menuchoice>Window class (application)</menuchoice> - match the class. | * <menuchoice>Window class (application)</menuchoice> - match the class.</translate> | ||
<translate> | |||
** <menuchoice>Match whole window class</menuchoice> - include matching the secondary class. | ** <menuchoice>Match whole window class</menuchoice> - include matching the secondary class. | ||
* <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.) | ||
* <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. | ||
* <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. | ||
* <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. | ||
Line 26: | Line 31: | ||
* <menuchoice>Unimportant</menuchoice> - ignore the field. | * <menuchoice>Unimportant</menuchoice> - ignore the field. | ||
* <menuchoice>Exact Match</menuchoice> | * <menuchoice>Exact Match</menuchoice> | ||
* <menuchoice>Substring Match</menuchoice> | * <menuchoice>Substring Match</menuchoice> | ||
{{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://doc.qt.nokia.com/latest/qregexp.html pattern matching using regular expressions]. | ||
Line 39: | Line 48: | ||
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. | ||
# For the application you'd like to create a rule, start the application. | # For the application you'd like to create a rule, start the application.</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> | ||
# Click on <menuchoice>Detect Window Properties</menuchoice> and | # 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> | ||
# When the mouse-cursor turns to cross-hairs, place it inside the application window (not the title bar) and left-click. | <translate> | ||
# A new window is presented with information about the selected window. Select the desired fields: | # Click on <menuchoice>Detect Window Properties</menuchoice> and </translate> | ||
#* '''Secondary class name''' - some applications have a secondary class name. This value can be used to restrict windows by this value. | <translate> | ||
#* '''Window role''' | # When the mouse-cursor turns to cross-hairs, place it inside the application window (not the title bar) and left-click.</translate> | ||
#* '''Window type''' | <translate> | ||
# A new window is presented with information about the selected window. Select the desired fields:</translate> | |||
<translate> | |||
#* '''Secondary class name''' - some applications have a secondary class name. This value can be used to restrict windows by this value.</translate> | |||
<translate> | |||
#* '''Window role'''</translate> | |||
<translate> | |||
#* '''Window type'''</translate> | |||
<translate> | |||
#* '''Window title''' | #* '''Window title''' | ||
Revision as of 21:05, 6 March 2012
Window Matching
The
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:
- - include matching the secondary class.
- match the class.
- - restrict the match to the function of the window (e.g. a main window, a chat window, etc.)
- - restrict the match to the type of window: Normal Window, Dialog Window, etc.
- - restrict the match to the title of the window.
- - restrict the match to the host name associated with the window.
For each field, the following operators can be applied against the field value:
- - ignore the field.
- pattern matching using regular expressions. - Qt's regular expressions are implemented - see
Detect Window Properties
The
function simplifies the process of entering the matching-criteria.- For the application you'd like to create a rule, start the application.
- Next, in the tab, set the number of seconds of delay before the function starts. The default is zero seconds.
- Click on and
- When the mouse-cursor turns to cross-hairs, place it inside the application window (not the title bar) and left-click.
- 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
button to back-fill the 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.