Placing Evolution windows to specific viewports with Compiz

Compiz has lots of nifty plug-ins and one of them is called Place. What it does essentially it takes a window and puts it on a specific desktop you tell it to.

The tricky part is to write rules to select windows. Evolution proved to be quite a pain to handle. I usually use 6 virtual desktops, or viewports in Compiz parlance. I have two rows of them, each has 3 virtual desktops. I’m used to having an e-mail client running in viewport 3, row 1 (X3:Y1) web-browser and console in viewport 1 (X1:Y1).

Well, initially my idea was to  grab a Window Title for Evolution’s Compose Message window and have it explicitly excluded in the rules. That kind of approach worked just fine on my office workstation where I use Thunderbird, but with Evolution this sort of rule:

title=Evolution & !title=”Compose Message”

Just didn’t work. What happened was either Compose Message window would be still forcibly placed to viewport 3, or, totally weird, main Evolution window would be transferred to active viewport and Compose Message window would take place of main Evolutoin window defined by Place plugin rules (in my case viewport 3, X3:Y1).

But as I said a little earlier, I keep my Chromium window in viewport 1 and when I click an “e-mail to” link I’d love to see Compose Message window in viewport 1, or in other words I want it to follow the viewport I’m working in. Well, that logic expressed in a rule above proved to be a total failure. I tried literally all the options for matching rules: window class, title, role, etc. — none of them worked. I’ve actually almost given up on this idea to take control of Evolution’s windows and left the rules as they were the last time I messed around with Place settings.

Eventually, what I ended up with, though, and it comes as a surprise to me as well, was a simple:


Which was created sort of accidentally, a leftover of the code from the last time I attempted to figure out the matching rules for Evolution, but it turned out to be exactly what I needed.

So, if you need to forcibly place Evolution on its launch to any viewport, just use this rule to match the Evolution main window. That’s it. Compose Message will follow your viewport.

If you feel a little uncomfortable with Compiz’s matching rules syntax, don’t worry I felt it was a little unusual as well! Here’s a nice post, though, that breaks down the most important aspects of the window matching deal:


Oxygen Style for Emerald

I had to switch from KWin to Compiz-Fusion since KWin with or without Composite tended to bring my system’s performance rate almost to a grinding halt.

I also had to use Emerald for window decorations. There’s one nuisance about it, though. Most of the themes look cartoon-ish and simply break this almost perfect look of Oxygen Style you can see in KDE 4.5.

I googled up a few solutions and one turned out to be almost what I was looking for. Alas, it looks.. well shall I say a little awkward?

It’s a typical Emerald theme – bulky and looking cartoon-ish – that incorporates Oxygen Style imagery and color scheme.

I wanted a theme that would resemble an Oxygen Style that is found in KDE as much closely as is possible. I found none so I created one for myself. And I’m writing this post to share it with you, of course. Not to just tease. I’m all for sharing information and stuff (no, not money. Don’t bother to ask).

Let met show how it looks:

Oxygen Emerald KDE 4.5 v.1.0

As I said it’s a derivative work. The changes are the following:

  • smaller size window control buttons (15px height, just as original KDE Oxygen theme)
  • button distances resemble those in KDE’s native Oxygen Style: Close button is separated from Minimize and Maximize
  • no glow and animation for control buttons in on hover state
  • smaller size decoration borders (top, bottom, left, right)
  • Smaller title font
  • Black shadow instead of light blue

So, if you’re interested you can download my Emerald Oxygen KDE 4.5 version 1.0 theme on You can vote (and you should) and you can also favorite this theme if you like it (do it if this is the case! :]