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.
Posted by Joachim Breitner at Tue Sep 27 23:42:39 2005:
Posted by Anonymous at Wed Sep 28 01:08:48 2005:
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.
Posted by Anonymous at Wed Sep 28 01:09:49 2005:
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.
Followup: also, XML is a lot easier to read and write programmatically, due to the widespread availability of XML libraries.
Posted by Ross at Wed Sep 28 08:00:03 2005:
Note the lack of XML-based programmatic languages, due to the sheer bloat the language gives you. None of the W3C specifications use <or> simply due to the fact that it is ugly and incredibly verbose.
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.
Posted by Ross at Wed Sep 28 08:10:20 2005:
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.
Oh, I forgot to mention that some actions are missing from this release:
* 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.
Posted by Lars at Wed Sep 28 09:48:14 2005:
* 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.
Hi Joachim and Anonymous,
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
Posted by Joachim Breitner at Wed Sep 28 11:34:13 2005:
Posted by torkel at Wed Sep 28 12:09:13 2005:
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
The only thing missing is a nice GUI for creating the matches. Editing files directly is so last decade :-)
Thanks for a great program!
/torkel
Posted by eric at Sun Oct 2 21:50:28 2005:
Thanks for a great program!
/torkel
thanks for this utility.
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 ?
Posted by Ross at Mon Oct 3 10:05:13 2005:
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 ?
Eric: yes, skip_tasklist is only for the panel task list. Metacity explictly ignore the skip tasklist attribute for the alt-tab list so that it is possibl e to access all windows from the keyboard.
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.
Posted by eric at Mon Oct 3 17:37:25 2005:
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.
ok, thanks for the precision about metacity and the 'Alt-Tab'...
and, about gkrellm, I'll use his ability to set itself as a dock as I did before.
Posted by german at Fri Oct 7 23:46:56 2005:
and, about gkrellm, I'll use his ability to set itself as a dock as I did before.
Have any one tried this under Gnome 2.12? It seems that pinning is not working, running with debug enabled does not throws any error
Posted by Ross at Sat Oct 8 11:13:06 2005:
Pinning was broken, a new release will be coming soon which fixes it (basically replace stick and unstick with pin and unpin in actions.c)
Posted by napoleon at Sun Oct 9 00:56:15 2005:
Posted by Ross at Sun Oct 9 12:31:23 2005:
Posted by german at Mon Oct 10 16:32:08 2005:
Posted by german at Mon Oct 10 16:47:26 2005:
Posted by Erich at Thu Oct 13 03:05:17 2005:
I do prefer an XML configuration format.
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...)
Posted by Ross at Thu Oct 13 08:13:32 2005:
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...)
I find the s-exp format far simplier, especially when you consider the amount of noise that logical operators would add to the XML format.
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.
Posted by Larry W. Virden at Fri Oct 14 12:36:23 2005:
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.
Has anyone worked on writing some sort of aid for generating s-expressions? I work in an environment where the users are less computer savvy. We wrote an aid - a desktop tabular input form - that assisted them in generating XML. Looks like we will now want to work on an XML to s-expression converter, as well as look at changing our form to generate s-expressions.
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.
Posted by Stefan at Sat Oct 15 17:56:29 2005:
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.
Hi Ross,
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!
Posted by Ross at Sun Oct 16 13:29:37 2005:
Posted by Erich at Mon Oct 17 02:08:45 2005:
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!
I just found out that apparently devilspie can't solve my most urgent window-placement needs...
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...
Posted by dino at Sat Oct 22 13:16:10 2005:
Posted by Ross at Sat Oct 22 13:44:06 2005:
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...