A slightly more in-depth look at Compiz plugin interaction

####If you have other examples you would like to share which can help explain how window matching in Compiz works, feel free to use some of the content below as a template of how to present your examples.

Before, in my recently-retitled How to use Compiz to always show some windows in a 3D desktop, I assumed all users already knew about how this crap worked. i figured I would post a more in-depth thread about how it all works, along with some example strings to show how plugins can play off one another in a much better fashion.

Let’s return to the screensaver example I used in that thread. There are three conditions, based around three plugins I wanted to use along with Desktop Cube;

  • The program must display in all workspaces (be sticky)
  • The program must not be rendered statically (shown outside of the cube)
  • The program must not be rendered with depth (Z, relative to face)

For this to happen, the following needed to be used as match strings for the following plugins;
Window Rules
Matches / Sticky
title=Electric Sheep
Static Windows
General / Window Match
Dock | (state=sticky & !(type=Desktop | title=Electric Sheep)
3D Windows
Misc. Options / Window Match
(Toolbar | Utility | Dialog | Normal | Unknown) & !(state=sticky)

See the words in bold? Those are the important bits to see, relevant to the program and its state. So the above basically says this;
“User decrees that Electric Sheep (title=electricsheep) is to show in all workspaces; User decrees that all windows which declare themselves as docks (Dock) as well all windows which show in all workspaces (state=sticky) are to not render in desktop cube, except (& !) for all windows which declare themselves as part of the desktop (type=Desktop) and Electric Sheep (title=Electric Sheep); User decrees that elevation from the desktop cube and from other windows apply to all windows which declare themselves as toolbar, utility, dialog, normal or of unknown type (Toolbar | Utility | Dialog | Normal | Unknown) except (& !state=sticky) for windows which show in all workspaces (state=sticky)

You can see the problem in that above statement if you are making a lot of windows sticky but not static; Even if you set those windows above, and you add more exceptions to windows which are static, they will not render on top of other windows even if they were the last active window, making them be on top of the stack. Which is why you need to be especially pedantic about which windows you’re matching with what plugin.

The ampersand, while presented as an exception (& !) is somewhat foolish to present above, because it is only “!” which is the exception flag. “&” can also be used to attach further conditionals, so you can say “Of a class, and of a type” so you can define only specific windows within a program, which is an example I may present if I do come across it, provided somebody else doesn’t do so first.

1 Like