So now I’m using KWin—KDE’s default window manager—as my window manager of choice. It appears to have some serious advantages over Sawfish in some ways:
- Its window matching features extend to forcing a window to be a dock, for instance, and also allow for better integration through EWMH
- The built in Composition Manager allows for fine-grained control, so for instance, the Universal Sidebar is automatically set translucent to 80% opacity without having to muck around with transset, and it’s less buggy too!
- Built-in DCOP support in KHotkeys if I ever need it
- Better themes available
I’ve even gotten my Quake Console working with KWin! I set up a few window matchers (leftmost icon on titlebar → Configure Window Behavior → Window-Specific Settings) for it. First, I set up a profile within konsole causing it to start without a menubar or tabbar (and with translucent colors), calling the profile QuakeConsole (and this name shows up in the titlebar). When setting up the matchers, I ensured that this title was matched.


Then I ensured that it’d be positioned without a border in the top-left corner, always on top.


Now, to actually start the Quake Konsole, I added these lines to my .xsession:
konsole --profile ‘Quake Console’ --script --geometry 1024x360 &
QUAKECONSOLE=$!; export QUAKECONSOLE
(sleep 25; exec dcop konsole-${QUAKECONSOLE} ‘konsole-mainwindow#1’ hide) &
(The $! grabs the PID of the last process started, which in this case happens to be the konsole. The sleep’s in there to allow the DCOP server to start up, and the dcop call is what’s used to hide the Quake Konsole.)
Now, in order to actually let me toggle the Quake Konsole, I use KHotKeys to run a script that’ll determine whether or not the window is hidden. If it is, it’ll show it using a dcop call; if it isn’t, it’ll hide it. This demonstrates just a small part of the power of scriptability of objects via DCOP. (DCOP exposes an object model in KDE applications that bother to expose methods; those that do can be activated by other objects making DCOP calls. This isn’t dissimilar to what COM does on Windows.)
Here’s the script:
#!/bin/sh
HIDDEN=$(dcop konsole-${QUAKECONSOLE} ‘konsole-mainwindow#1’ hidden)
if [ ${HIDDEN-x} = x ]; then exit; fi
if [ ${HIDDEN} = true ]; then
exec dcop konsole-${QUAKECONSOLE} ‘konsole-mainwindow#1’ show
else
exec dcop konsole-${QUAKECONSOLE} ‘konsole-mainwindow#1’ hide
fi
The first dcop client call asks the konsole whether it’s hidden. If it is, it asks the konsole to show itself, otherwise to hide itself.
This script is activated by KHotKeys.



And in the end, the effect is as seamless as it was with sawfish.
I’ve also used the window matchers to do things such as turn off the taskbar buttons for gdeskcal, gkrellm and xmms, so that only windows that I’m bothered about show up.
I’m impressed how far KDE’s come these past few years, and I’m really interested to see what the project achieves with the 4.0 release.
Update:
I’m now back to Sawfish because KWin is exhibiting shading bugs when its compositor is turned on. Specifically, when shading a window, a rectangular portion of the window remains as ‘debris’ under the titlebar; this can be ‘wiped away’ by moving the titlebar up and down. Also, when unshading a window, the window remains invisible until it’s moved. Seemingly minor issues, but enough to make me go back to Sawfish until they’re resolved.
(Besides, Sawfish’s transparent move is pretty.
)
