Devil's Pie "Wind The Frog" 0.13
Devil's Pie (someones favourite window manipulation tool) 0.13 is out. This release is far more exciting than 0.12!
- Total rewrite.
- No, really. A complete rewrite, no file left untouched. Many thanks to Pixar Animation Studios for sponsoring this work.
- Use s-expressions instead of XML as the configuration file format, allowing matches to be combined in new and exciting ways with (and) (or) and (not) operators.
- Read configuration from both the users home directory and /etc, allowing centralised configuration.
- Add the beginnings of a test suite.
Downloads are in the usual place. I'll have Debian packages uploaded shortly I expect.
Thanks again to Pixar, for without their kindness this release would never have happened.
Use s-expressions instead of XML as the configuration file format, allowing matches to be combined in new and exciting ways with (and) (or) and (not) operators.
Ewww. Any chance of supporting the old format as well?
Also, the second statement does not follow from the first; there's no reason you can't have <and> <or> and <not> tags.
Thanks.
S-expressions are faster to parse and far terser. Have a look at the examples and see for yourself.
If you really don't like the old format, you can use Devil's Pie 0.12, or fork it. I branched 0.12 as devilspie-xml in GNOME CVS for this purpose.
* set opacity
* set geometry
* execute
If anyone wants to learn the new source, grabbing CVS and porting these would be great.
It should also be possible to write a XSLT file which transformed from the old XML configuration format to s-expressions, although it would take far longer to write the XSLT than it would to rewrite manually.
You should have a look at the new syntax before you decide you want to stick with XML. Converting from XML to the s-expressions is really very easy, and your configuration files will be a lot shorter. I replaced my 122-line XML .devilspie.xml with three s-expressions, which were 23 lines all together. I think it took me less than five minutes to do the conversion.
cheers,
lars
Thanks for a great program!
/torkel
I recently switch from sawfish to metacity, and this "window matching" possibility lacks.
but I got a question, what is the skip_tasklist option ? Is this only for the panel and not for the "task list" when I hit Alt-Tab ? Is this normal that my gkrellm (with (if (is (application_name) "gkrellm") (skip_tasklist))) appears then ?
IIRC, recent versions of gkrellm (I did this about 2 years ago so it's not that recent) can set themselves as type dock, so they don't appear in any list. Use that instead of hacking around the problem with devilspie.
and, about gkrellm, I'll use his ability to set itself as a dock as I did before.
So much stuff uses XML, and consistency alone would be enough reason for me to stick with XML...
I don't care if s-expressions are shorter or easier to parse either... I find them not really easier to read.
And on the long run, this should be configureable by the non-programmer user anyway, who can neither read or write S-expressions or XML anyway. Therefore I'd really avoid doing too much and/or/not magic just for the features.
Keep it simple and stupid (and useable...)
But if you prefer the XML format then continue using 0.12, I can't make you upgrade. I even branched 0.12 in CVS so that someone can continue maintaining it if they really want to.
Not complaining, Ross - just looking for others doing the same type of coding.
As for branching the code, trying to keep the two versions up to date and in parallel is more work than I have time to do. So keeping with the XML version isn't really an option for me I guess.
Anyways, I'm going to be looking at the new version today to see if I can get it up and running.
In actions.c, there's a small bug on line 297, that disables the use of the wintype function.
Right now, that line is
if (argc != 1 || argv[0]->type == ESEXP_RES_STRING) {
Changing it to
if (argc != 1 || argv[0]->type != ESEXP_RES_STRING) {
worked for me.
Other than that, great work. Kudos!
Upon creation, the gnome-terminal windows don't have their distinguished titles yet, so I can't have devilspie place them like I want, because it just can't tell them apart...
Similarly, it can't hide my gmpc window on login, because it's not just to be minimized and/or hidden from the tasklist, but it should actually be closed (or never opened, to be precise; I hope the next upstream version allows me to do this)
So while devilspie (the last xml version...) does what it claims, this just doesn't solve my issues...