[PATCH] devilspie replacement in only 250 lines of code

Paweł Słowik wik at iq.pl
Thu Mar 2 05:38:40 EST 2006


here's a patch that makes it possible to configure window
startup state (iconified, undecorated etc.) based on window
properties (class, title, name, icon name)

I know that this can be done using devilspie, but devilspie
introduces new dependencies, and what's the point of using a
lightweight wm, if the system gets cluttered with some obscure
libs? ;)

the patch was developed using 3.2 source tarball, but it also
applies to 3.3-rc2
and I'm not really a C programmer, there might be some errors...

configuration syntax:
<match winprop="P" pattern="PATTERN">
	<desktop>DESKTOP</desktop>
	<x>INT</x>
	<y>INT</y>
	<w>INT</w>
	<h>INT</h>
	<shaded />
	<iconic />
	<skip_pager />
	<skip_taskbar />
	<fullscreen />
	<above />
	<below />
	<max_horz />
	<max_vert />
	<undecorated />
</match>
P is one of the characters: t i n c , to apply PATTERN against
window title, icon title, window name or window class
PATTERN is a glib Glob-style pattern (with '*' as wildcard and '?'
as joker, sorry no regexps)
DESKTOP is an integer or the string: all

an example config file is attached, put it in
~/.config/openbox/winstate.xml

-- 
Paweł Słowik
wik at iq.pl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: openbox-3.2-winstate.diff.gz
Type: application/octet-stream
Size: 2278 bytes
Desc: not available
URL: <http://icculus.org/pipermail/openbox/attachments/20060302/fcd4cc1e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winstate.xml.gz
Type: application/octet-stream
Size: 147 bytes
Desc: not available
URL: <http://icculus.org/pipermail/openbox/attachments/20060302/fcd4cc1e/attachment-0001.obj>


More information about the openbox mailing list