KWin Rules Examples: Difference between revisions
(formatting changes) |
(formatting changes) |
||
Line 36: | Line 36: | ||
<translate> | <translate> | ||
<!--T:12--> | <!--T:12--> | ||
# Clicking | # Clicking <menuchoice>OK</menuchoice> the previous window back-fills the results in the '''Window Matching''' tab. Enter a meaningful text in the <menuchoice>Description</menuchoice> field (which is displayed in the '''KWin Rule''' window):<br /><br />[[Image:window-matching-ready-akregator.png|350px|center]]</translate> | ||
<translate> | <translate> | ||
<!--T:13--> | <!--T:13--> | ||
# Enable the window attributes: | # Enable the window attributes: <menuchoice>Position</menuchoice>, <menuchoice>Size</menuchoice> and <menuchoice>Desktop</menuchoice>. The initial values are set by <menuchoice>Detect Window Properties</menuchoice> and can be overridden:<br /><br />[[Image:akregator-attributes.png|350px|center]]</translate> | ||
<translate> | <translate> | ||
<!--T:14--> | <!--T:14--> | ||
# Clicking | # Clicking <menuchoice>OK</menuchoice> in the previous window returns to the main '''KWin Rules'''. The new rule with its description is listed:<br /><br />[[Image:kwin-rules-main-n-akregator.png|350px|center]]</translate> | ||
<translate> | <translate> | ||
<!--T:15--> | <!--T:15--> | ||
# Click | # Click <menuchoice>OK</menuchoice> to close the window.</translate> | ||
<translate> | <translate> | ||
<!--T:16--> | <!--T:16--> | ||
Line 58: | Line 58: | ||
<!--T:19--> | <!--T:19--> | ||
For each attribute, use the | For each attribute, use the <menuchoice>Force</menuchoice> [[Special:myLanguage/KWin_Rules_Window_Attributes#Parameters|parameter]] so it can not be overridden. | ||
<!--T:20--> | <!--T:20--> | ||
Line 64: | Line 64: | ||
<!--T:21--> | <!--T:21--> | ||
# A rule for ''Kopete Chat'' and</translate> | # A rule for '''Kopete Chat''' and</translate> | ||
<translate> | <translate> | ||
<!--T:22--> | <!--T:22--> | ||
# A rule for ''Kopete'' | # A rule for '''Kopete''' | ||
<!--T:23--> | <!--T:23--> | ||
The ''Kopete Chat'' rule's matching-criteria is more restrictive than the ''Kopete'' rule as it needs to match a specific | The '''Kopete Chat''' rule's matching-criteria is more restrictive than the ''Kopete'' rule as it needs to match a specific Window Role: the chat window. Due to [[Special:myLanguage/KWin_Rules#Rule_Evaluation|rule evaluation]] processing, the '''Kopete Chat''' rule must precede the '''Kopete''' rule in the [[Special:myLanguage/KWin_Rules_Examples#Kopete KWin Rule List|KWin Rule list for Kopete]]. | ||
</translate><span id="Kopete_Chat_Rule"></span><translate> | </translate><span id="Kopete_Chat_Rule"></span><translate> | ||
Line 80: | Line 80: | ||
<!--T:26--> | <!--T:26--> | ||
# Use | # Use <menuchoice>Detect Window Properties</menuchoice> and select the '''Kopete Chat''' window. Check the <menuchoice>Window role</menuchoice> box to restrict the criteria to chat windows - for additional information see [[Special:myLanguage/KWin_Rules_Window_Matching|window matching]]:<br /><br />[[Image:kopete-chat-info.png|350px|center]]</translate> | ||
<translate> | <translate> | ||
<!--T:27--> | <!--T:27--> | ||
# Clicking | # Clicking <menuchoice>OK</menuchoice> in the previous window back-fills the results in the <menuchoice>Window Matching</menuchoice> tab. Enter a meaningful text in the <menuchoice>Description</menuchoice> box:<br /><br />[[Image:window-matching-kopete-chat.png|350px|center]]</translate> | ||
<translate> | <translate> | ||
<!--T:28--> | <!--T:28--> | ||
Line 92: | Line 92: | ||
<!--T:30--> | <!--T:30--> | ||
{{Note|The | {{Note|The <menuchoice>Skip taskbar</menuchoice> attribute is set to <menuchoice>No</menuchoice> to display the window in the taskbar which loosely translates to: ''no'' ''do not'' ''skip taskbar'' {{Smiley}}.}} | ||
</translate><span id="Kopete_Rule"></span><translate> | </translate><span id="Kopete_Rule"></span><translate> | ||
Line 102: | Line 102: | ||
<!--T:33--> | <!--T:33--> | ||
# Use | # Use <menuchoice>Detect Window Properties</menuchoice> and select the '''Kopete''' window. Match only by primary class name so leave the check boxes unchecked - for additional information see [[Special:myLanguage/KWin_Rules_Window_Matching|window matching]]:<br /><br />[[Image:kopete-info.png|350px|center]]</translate> | ||
<translate> | <translate> | ||
<!--T:34--> | <!--T:34--> | ||
# Clicking | # Clicking <menuchoice>OK</menuchoice> in the previous window back-fills the results in the <menuchoice>Window Matching</menuchoice> tab. Enter a meaningful text in the <menuchoice>Description</menuchoice> box:<br /><br />[[Image:window-matching-kopete.png|350px|center]]</translate> | ||
<translate> | <translate> | ||
<!--T:35--> | <!--T:35--> | ||
# Enable the following attributes:<br /><br />[[Image:kopete-attribute-1.png|350px|center]]<br>[[Image:kopete-attribute-2.png|350px|center]]</translate> | # Enable the following attributes:<br /><br />[[Image:kopete-attribute-1.png|350px|center]]<br />[[Image:kopete-attribute-2.png|350px|center]]</translate> | ||
<translate> | <translate> | ||
<!--T:36--> | <!--T:36--> | ||
Line 118: | Line 118: | ||
<!--T:38--> | <!--T:38--> | ||
As mentioned, due to [[Special:myLanguage/KWin_Rules#Rule_Evaluation|rule evaluation]] processing, the '''Kopete Chat''' rule must precede the '''Kopete''' rule:<br><br>[[Image:kwin-kopete-rules.png|350px|center]] | As mentioned, due to [[Special:myLanguage/KWin_Rules#Rule_Evaluation|rule evaluation]] processing, the '''Kopete Chat''' rule must precede the '''Kopete''' rule:<br /><br />[[Image:kwin-kopete-rules.png|350px|center]] | ||
</translate><span id="Suppress_a_Window_from_showing_on_Pager"></span><translate> | </translate><span id="Suppress_a_Window_from_showing_on_Pager"></span><translate> |
Revision as of 19:14, 16 March 2012
Examples
Pin a Window to a Desktop and set other Attributes
Pin Akregator to Virtual Desktop 2. Additionally, start the application with a preferred size and position. For each attribute, use the Apply Initially parameter so it can be overridden at run-time.
The KWin rule is created as follows:
- Start Akregator on desktop two, size and position it to suit:
- Right-click on the menu bar and select
- Select the
- The Edit Window-Specific Settings window is displayed.
- Click window matching:
- Clicking
- Enable the window attributes:
- Clicking
- Click to close the window.
- Done.
Application on all Desktops and Handle One Child Window Uniquely
Except for conversation windows, display Kopete and its children windows on all desktops and skip the systray and pager. For children conversation windows, treat them as the parent window except show them in systray.
For each attribute, use the parameter so it can not be overridden.
In order to implement the above, two rules need to be created:
- A rule for Kopete Chat and
- A rule for Kopete
The Kopete Chat rule's matching-criteria is more restrictive than the Kopete rule as it needs to match a specific Window Role: the chat window. Due to rule evaluation processing, the Kopete Chat rule must precede the Kopete rule in the KWin Rule list for Kopete.
Kopete Chat Rule
Assuming a Kopete Chat window is open:
- Use window matching:
- Clicking
- Enable the following attributes:
- Click through to complete entry of the rule.
Kopete Rule
Assuming Kopete is open:
- Use window matching:
- Clicking
- Enable the following attributes:
- Click through to complete entry of the rule.
Kopete KWin Rule List
As mentioned, due to rule evaluation processing, the Kopete Chat rule must precede the Kopete rule:
Suppress a Window from showing on Pager
KNotes currently does not allow for its notes to skip the pager however a rule easily solves this shortcoming.
Assuming a sticky note' window is available:
- Use Detect Window Properties and select any sticky note window. Match only by primary class name so leave the check boxes unchecked - for additional information see window matching:
- Clicking OK in the previous window back-fills the results in the Window Matching tab. Enter a meaningful Description:
- Enable the Skip Pager attribute with the Force the parameter:
- Click through to complete entry of the rule.
Force a Window to the Top
To pop an active window to the top, set its Focus stealing prevention attribute to None, typically, in conjunction with the Force parameter:
Multiple Rules per Application
Thunderbird has several different child windows. This example:
- Pin Thunderbird's main window on Virtual Desktop 1 with a specific size and location on the desktop.
- Allow the Thunderbird composer window to reside on any desktop and when activated, force focus and pop it to the top of all windows.
- Pop the Thunderbird reminder to the top and do not give it focus so it isn't inadvertently dismissed.
Each rule's matching criteria is sufficiently restrictive so their order within the main KWin window is not important to affect rule evaluation.
Thunderbird - Main
Assuming the Thunderbird Main window is open, sized and position to suit:
- Use Detect Window Properties and select the Thunderbird Main window. Check the Window role box to restrict the criteria to the main window - for additional information see window matching:
- Clicking OK in the previous window back-fills the results in the Window Matching tab. Enter a meaningful Description:
- Enable the following attributes:
- Click through to complete entry of the rule.
Thunderbird - Composer
Assuming a Thunderbird Composer window is open:
- Use Detect Window Properties and select the Thunderbird Compose window. Check the Window role and Window type boxes to restrict the criteria to composition windows - for additional information see window matching:
- Clicking OK in the previous window back-fills the results in the Window Matching tab. Enter a meaningful Description:
- Enable the following attributes:
- Click through to complete entry of the rule.
Thunderbird - Reminder
Assuming a Thunderbird Reminder window is open:
- Use Detect Window Properties and select the Thunderbird Reminder window. Check the Secondary class name and Window Type boxes to restrict the criteria to reminder windows - for additional information see window matching:
- Clicking OK in the previous window back-fills the results in the Window Matching tab. Enter a meaningful Description:
- Enable the following attributes:
- Click through to complete entry of the rule.