Chapter 7. Examples

Note

The first example details all the necessary steps to create the rules. In order to keep this page a manageable size, subsequent examples only list steps specific to the example.

Note

The Pager attribute refers to the Virtual Desktop Manager:



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:

  1. Start Akregator on desktop two, size and position it to suit:



  2. Right-click on the titlebar and select More ActionsWindow Manager Settings...:



  3. Select the Window Rules in the left column and click on New...:



  4. The Edit Window-Specific Settings window is displayed. Window matching is the default tab:



  5. Click Detect Window Properties with 0s delay the cursor immediately turns into cross-hairs. Click (anywhere) inside the Akregator window (but not the title bar). The window criteria are presented. Match only by primary class name so leave the check boxes unchecked - for additional information see window matching:



  6. Clicking OK the previous window back-fills the results in the Window Matching tab. Enter a meaningful text in the Description field (which is displayed in the KWin Rule window):



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



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



  9. Click OK to close the window.

  10. Done.