KWin Rules Examples/da: Difference between revisions

From KDE Wiki Sandbox
(Importing a new version from external source)
(Importing a new version from external source)
Line 18: Line 18:
# Nu vises vinduet '''Redigér vinduesspecifikke indstillinger'''. Fanebladet <menuchoice>Vindue-matchning</menuchoice> vises som standard:<br /><br />[[Image:window-matching-init.png|350px|center]]
# Nu vises vinduet '''Redigér vinduesspecifikke indstillinger'''. Fanebladet <menuchoice>Vindue-matchning</menuchoice> vises som standard:<br /><br />[[Image:window-matching-init.png|350px|center]]
# Klik på <menuchoice>Detektér vinduesegenskaber</menuchoice> med <menuchoice>0s. forsinkelse</menuchoice> hvorved markøres umiddelbart bliver til et lille sigtekors. Klik hvorsomhelst inde i '''Akregators''' vindue (men ikke på titellinjen). Nu vises information om det udvalgte vindue. Match kun ved primært klassenavn, det vil sige aktivér ingen af tilvalgene &mdash; for yderligere information se [[Special:myLanguage/KWin_Rules_Window_Matching|vindue-matchning]]:<br /><br />[[Image:akgregator-info.png|350px|center]]
# Klik på <menuchoice>Detektér vinduesegenskaber</menuchoice> med <menuchoice>0s. forsinkelse</menuchoice> hvorved markøres umiddelbart bliver til et lille sigtekors. Klik hvorsomhelst inde i '''Akregators''' vindue (men ikke på titellinjen). Nu vises information om det udvalgte vindue. Match kun ved primært klassenavn, det vil sige aktivér ingen af tilvalgene &mdash; for yderligere information se [[Special:myLanguage/KWin_Rules_Window_Matching|vindue-matchning]]:<br /><br />[[Image:akgregator-info.png|350px|center]]
# Clicking '''OK''' in the previous window back-fills the results in the '''Window Matching''' tab. Enter a meaningful '''Description''' (which is displayed in the '''KWin Rule''' window):<br /><br />[[Image:window-matching-ready-akregator.png|350px|center]]
# Når du klikker på <menuchoice>O.k.</menuchoice> i det forrige vindue, så overføres informationerne til fanebladet <menuchoice>Vindue-matchning</menuchoice>. Skriv en meningsfuld tekst i feltet <menuchoice>Beskrivelse</menuchoice>; den vil blive vist i Vinduet med '''KWin''' regler:<br /><br />[[Image:window-matching-ready-akregator.png|350px|center]]
# Enable the window attributes: '''Position''', '''Size''' and '''Desktop'''.  The initial values are set by '''Detect Window Properties''' and can be overridden:<br /><br />[[Image:akregator-attributes.png|350px|center]]
# Enable the window attributes: '''Position''', '''Size''' and '''Desktop'''.  The initial values are set by '''Detect Window Properties''' and can be overridden:<br /><br />[[Image:akregator-attributes.png|350px|center]]
# Clicking '''OK''' 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]]
# Clicking '''OK''' 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]]

Revision as of 19:14, 16 March 2012

Other languages:

Eksempler

Note
Det første eksempel medtager alle de nødvendige skridt til at lave regler. For at holde denne side på en overkommelig størrelse medtager de følgende eksempler kun de skridt, som er specifikke for eksemplet.


Note
Egenskaben Skrivebordsvælger henviser til Manageren for virtuelle skriveborde:

Fastgør et vindue til et skrivebord eller indstil andre egenskaber

Fastgør Akregator til Virtuelt skrivebord 2. Start desuden programmet op med en foretrukken størrelse og position. For hver egenskab bruges parameteren Anvend i begyndelsen, sådan at den kan ændres, når programmet køres.

KWin reglen laves således:

" Start Akregatorskrivebord 2, tilpas vinduets størrelse og position som du vil have det:

  1. Højreklik på menulinjen og vælg Indstil vinduesopførsel...:

  2. Klik på gruppen Vinduesregler i feltet til venstre og klik på knappen Ny...:

  3. Nu vises vinduet Redigér vinduesspecifikke indstillinger. Fanebladet Vindue-matchning vises som standard:

  4. Klik på Detektér vinduesegenskaber med 0s. forsinkelse hvorved markøres umiddelbart bliver til et lille sigtekors. Klik hvorsomhelst inde i Akregators vindue (men ikke på titellinjen). Nu vises information om det udvalgte vindue. Match kun ved primært klassenavn, det vil sige aktivér ingen af tilvalgene — for yderligere information se vindue-matchning:

  5. Når du klikker på O.k. i det forrige vindue, så overføres informationerne til fanebladet Vindue-matchning. Skriv en meningsfuld tekst i feltet Beskrivelse; den vil blive vist i Vinduet med KWin regler:

  6. Enable the window attributes: Position, Size and Desktop. The initial values are set by Detect Window Properties and can be overridden:

  7. Clicking OK in the previous window returns to the main KWin Rules. The new rule with its Description is listed:

  8. Click OK to close the window.
  9. 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 Force parameter so it can not be overridden.

In order to implement the above, two rules need to be created:

  1. A rule for Kopete Chat and
  2. 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:

  1. Use Detect Window Properties and select the Kopete Chat window. Check the Window role box to restrict the criteria to chat windows - for additional information see window matching:

  2. Clicking OK in the previous window back-fills the results in the Window Matching tab. Enter a meaningful Description:

  3. Enable the following attributes:

  4. Click through to complete entry of the rule.
Note
The Skip taskbar attribute is set to No to display the window in the taskbar which loosely translates to: no do not skip taskbar .

Kopete Rule

Assuming Kopete is open:

  1. Use Detect Window Properties and select the Kopete window. Match only by primary class name so leave the check boxes unchecked - for additional information see window matching:

  2. Clicking OK in the previous window back-fills the results in the Window Matching tab. Enter a meaningful Description:

  3. Enable the following attributes:


  4. 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:

  1. 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:

  2. Clicking OK in the previous window back-fills the results in the Window Matching tab. Enter a meaningful Description:

  3. Enable the Skip Pager attribute with the Force the parameter:

  4. 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:

  1. 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:

  2. Clicking OK in the previous window back-fills the results in the Window Matching tab. Enter a meaningful Description:

  3. Enable the following attributes:

  4. Click through to complete entry of the rule.

Thunderbird - Composer

Assuming a Thunderbird Composer window is open:

  1. 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:

  2. Clicking OK in the previous window back-fills the results in the Window Matching tab. Enter a meaningful Description:

  3. Enable the following attributes:

  4. Click through to complete entry of the rule.

Thunderbird - Reminder

Assuming a Thunderbird Reminder window is open:

  1. 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:

  2. Clicking OK in the previous window back-fills the results in the Window Matching tab. Enter a meaningful Description:

  3. Enable the following attributes:


  4. Click through to complete entry of the rule.