KDE Window Rules, Attributes, and Codes

We have been struggling to get KDE Window Rules to work as expected. Documentation however is not apparent in a centralized form. This link is to the most complete we have found:


That presentation is primarily prose. Here we augment that presentation with the results of experimentation that explicitly defines the parameters of the KDE Window Rules construct.

There are four groups of rules:

  • Window Matching
  • Size&Position
  • Arrangement and access
  • Appearance and fixes

There are a number of attributes in each group. Each attribute has a value and a rule.

There are various types of rules defined both numerically and in prose. The numbers are used in~/.config/kwinrulesrc. The prose is used in the various dialog boxes and the documentation cited above. We tabulate the following types:

• Matching Types
1 Unimportant
2 Exact match
3 Substring match
4 Regular expression
• Enforcement Types
1 Do not affect
2 Force
3 Apply initially
4 Remember
5 Apply now
6 Force temporarily
• Window Types
1 Normal
2 Dialog
3 Utility
4 Dock (panel)
5 Toolbar
6 Torn-off menu
7 Splash screen
8 Desktop
9 Unmanaged window
10 Standard menubar
• Placement Types
1 Default
2 No placement
3 Smart
4 Maximizing
5 Cascade
6 Centered
7 Random
8 Top-left corner
9 Under mouse
10 On main window
• Focus Control Types
1 None
2 Low
3 Normal
4 High
5 Extreme

kwin uses these types to implement rules following the table below:

KDE Rules Table
Download KDE Rules Table