Devil's Pie "Lazy Release" 0.14

Devil's Pie (someones favourite window manipulation tool) 0.14 is out. A nice and lazy release here, I just merged patches from other people.

Downloads are in the usual place.

21:05 Sunday, 16 Oct 2005 [#] [computers/devilspie] (34 comments)

Posted by Clay Barnes at Thu Oct 20 18:07:32 2005:
Your progam seems very useful, but essentially undocumented.  Do you want a documenter?  I have an extra 30 or so hours a week from sleeping only 20 hr/week and I may as well do something productive (besides scripting every operation I have ever performed, moving towards a computer that can live my life without me)...
Posted by Mikachu at Thu Oct 20 19:13:23 2005:
The undecorate action doesn't work for me unless i change the code to look like this,

  XChangeProperty(GDK_DISPLAY(), wnck_window_get_xid (c->window),
  my_wnck_atom_get ("_MOTIF_WM_HINTS"),
  my_wnck_atom_get ("_MOTIF_WM_HINTS"), 32, PropModeReplace,
  (unsigned char *)&hints, PROP_MOTIF_WM_HINTS_ELEMENTS);

(the second one was XA_ATOM before)
This is also how the code looked in 0.12 except it saved the atom in a variable first but i was lazy now.
Posted by Ross at Thu Oct 20 20:25:52 2005:
Mikachu: aha, thanks!
Posted by Clay Barnes at Thu Oct 20 22:20:54 2005:
Is it just me or are a lot of features missing since .12 (opacity, for one)?

Any idea on the dev cycle for re-introduction?
Posted by Ross at Fri Oct 21 08:40:49 2005:
Clay: by "lots" you mean "two": opacity and execute.  I'll finish porting them at some point, but patches are accepted.
Posted by Toby Haynes at Wed Oct 26 21:44:46 2005:
Nice work Ross. I have to admit that the change to s-expressions caught me off guard but it's a welcome one (especially to those of us who grew up with Emacs or Sawfish).

Did you take Clay up on his offer of docs? Is anything happening on that front? It would be nice to have some worked examples (hell, you can have some of mine). Having the multiple file approach in a directory makes it particularly easy to disable/enable certain scripts, which is a nice touch (especially for debugging).

Cheers,
Toby Haynes
Posted by Theo at Tue Nov 1 01:33:20 2005:
Ok, I searched a little bit to convert my old xml file to s-expr.

Here's my result:

:: eterm.ds
(if (is (application_name) "Eterm") (begin skip_tasklist skip_pager pin below))
:: thunderbird.ds
(if (is (application_name) "mozilla-thunderbird-bin") (begin geometry "+0+0" set_workspace 2))

I hope that it can help someone else ...

Theo from Belgium.
Posted by Ravn Revheim at Thu Nov 3 09:05:49 2005:
Yes, multiple files is a nice approach ... but why not have both?
Personally I would love to have all my settings in one 'main' file, and do test new settings in a separate file.
If anything changes, one would only have to open one file and do the proper search replace on it...
Or am I way off here? (a bit early in the morning still ;)
Posted by Ross at Thu Nov 3 09:17:09 2005:
For the final time, enforced multiple files is a known bug. When it's fixed, you can have one file with all expressions, lots of files with one expression, or lots of files with many expressions.
Posted by Harold Aling at Fri Nov 4 14:15:09 2005:
Will the ability to 'minimize to the system tray' ever be one of devilspie's cool list of features?
Posted by Ross at Fri Nov 4 14:48:54 2005:
Harold: No.  That requires application action to work well, and I disagree with using the notification area for anything other than notification.
Posted by Void lon iXaarii at Thu Nov 10 09:32:04 2005:
cool! thanks for making this great program! I'm moving from Fluxbox which had remember workspace incorporated to gnome and without this I may have switched back to Fluxbox. Thnx a lot

PS: i used to use .11, now moved to .14 ... and now i don't see in the docs folder any examples to get me started :(
Posted by Ross at Thu Nov 10 09:42:12 2005:
The README has documented examples.
Posted by Marc at Sat Nov 12 15:42:10 2005:
I am being dense and seem to have trouble getting devilspie 0.14 to load at login. This is on FC4 using GNOME.

I have tried to manually include devilspie as a startup program using the session manager. However, when I do, the login screen hangs and does not complete. This is using 'devilspie' and 'devilspie &' as the command. I have both firestarter and gaim starting just using the program name, without the '&' and these work fine.

I have also tried to run devilspie from a console, with various command line incarnations. However, I cannot get the session manager to save it and then load it at login.

What is the correct command line syntax to use here? I compiled 0.14 from source.

Thanks for any guidance,

Marc
Posted by Jason at Sun Nov 20 00:26:41 2005:
I just started using devil's pie and think it is great.  Thanks for this very useful program.

-Jason
Posted by Larry W. Virden at Tue Nov 22 11:57:56 2005:
Marc - try using the entire pathname to devilspie. Perhaps at the point in the login that devilspie is to start, $PATH hasn't been set to include the directory where you installed devilspie.
Posted by lenix at Tue Nov 22 17:10:35 2005:
i've came up with a small text about the new configurationfile-syntax and some other thoughts on devilspie.

it shows you can break up an s-expr into multiple lines to make them readable, has a list of actions/matchers and some other explanation.

i would've posted here directly but i think it will screw my formating here.

if interested, see http://lenix.de/en/home/blog for english version, http://lenix.de/de/home/blog for a german one.

next to this, there's a segfault-bug in matchers.c in 0.14-release, don't know if it has already been fixed in cvs so i'll mention it here.
func_window_role should be changed to not return null, like in

  char *buf;

  r = e_sexp_result_new(f, ESEXP_RES_STRING);
  buf = my_wnck_get_string_property_latin1 (wnck_window_get_xid (c->window),
  my_wnck_atom_get("WM_WINDOW_ROLE"));
  r->value.string = buf ? buf : g_strdup( "" ); // prevent segfaults due to .string == NULL

else it will segfault in functions like (is..), (matches..), etc when there's no role set.

// lenix
Posted by Victor B. Gonzalez at Wed Nov 23 21:48:47 2005:
Hello,

Devilspie is a really great program. Being new to Linux I've found that the one program I probably wouldn't be able to live without is Devilspie.

I am fortunate to have come across it. I have a request and a hope it would be implemented at some point. It is in regards to "skip_tasklist".

Some programs like Gaim and Rhythmbox show up both in the task list and system tray. Set "skip_tasklist" to TRUE on these programs and you save on real estate. Thanks!

Other programs, show up only in the task_list when it could have been better to have them only in the system tray. Examples are, Thunderbird, Totem Media Player & Terminal.

I like to have Thunderbird open checking my email, Totem media player playing some music tracks and the Terminal always in the middle of something...

These windows stay on screen more than they're ever interacted with. Here is my request. May you please consider adding an option to "system_tray". "system_tray" TRUE adds an icon to the tray...

When you match "skip_tasklist" & "system_tray" to true, you can iconize applications which need to stay on screen, off the task list yet easy to get too. I can see this as being a good thing :)

Thank you for your time!
Posted by Ross at Wed Nov 23 22:04:55 2005:
Victor: that would be very tricky, and goes against what the notification area is for.  If you want to save real estate, use the window selector applet rather than the window list, or write a replacement window list applet which doesn't display labels.
Posted by Victor B. Gonzalez at Thu Nov 24 13:08:44 2005:
Hello Ross,

Thank you for your time! You've taught me something new with the "Window Selector". It is not exactly what I had invisioned but i'll play with it. Anyhow Ross, thank you for your time in making Devilspie and you time in replying back to my message :)

Have a happy thanksgiving!
Posted by Davide at Thu Nov 24 14:03:08 2005:
Hi,

I'm using devilspie 0.16 with gnome 2.12, but I'm not able to set it properly. I'd like to apply it to xosview, so I've createdthe ~/.devilspies/xosview.ds file (loaded properly as shown by the debugger).
The file contains the following line:

(if (matches (application_name) "xosview") (begin pin (skip_pager) (skip_tasklist)))

anyway, xosview is still listed in the window list on the gnome-panel.
Any suggestion about that?

Thanks a million.
Davide
Posted by Davide at Thu Nov 24 14:06:43 2005:
Hi,

I'm using devilspie 0.16 with gnome 2.12, but I'm not able to set it properly. I'd like to apply it to xosview, so I've createdthe ~/.devilspies/xosview.ds file (loaded properly as shown by the debugger).
The file contains the following line:

(if (matches (application_name) "xosview") (begin pin (skip_pager) (skip_tasklist)))

anyway, xosview is still listed in the window list on the gnome-panel.
Any suggestion about that?

Thanks a million.
Davide
Posted by Victor B. Gonzalez at Thu Nov 24 23:44:19 2005:
Ross, thank you for the window selector idea. Unfortunately, if I hide a window using skip_tasklist set to true, I can not select it in the selector either... I just thought, having an option to iconize to tray would be a good idea and fit the program well... I hope it is considered to be an option :)

Happy Thanksgiving!
Posted by Ross at Fri Nov 25 07:51:43 2005:
Yes, of course skip_tasklist removes it from the window selector, as it is a task list.  I don't plan on implementing a wrapper to get windows into the notification area as I don't agree that is how the notification area should be used: it's for notifications, not as another place for some windows to go when not visibile.
Posted by Davide at Fri Nov 25 12:17:13 2005:
any comment about the s-exp that I'm using?
Posted by Ross at Fri Nov 25 12:35:17 2005:
I really prefer support requests via email, web comments totally suck for private problems.  Try removing the brackets around the arguments to pin.
Posted by Ross at Fri Nov 25 12:35:32 2005:
By "pin" I meant "begin" of course.
Posted by Larry W. Virden at Wed Nov 30 12:08:54 2005:
When I come to what seems to be the main page for devilspie, it seems to indicate that version 0.14 is the latest version. Yet I see, above, several references to version 0.16 ... is my web browser playing tricks on me again?
Posted by Lucas at Fri Dec 9 05:27:02 2005:
Can't comment on 0.16 so I'll put it here:

(if
  (and (is (application_name) "ROX-Filer")
  (matches (window_name) "^ROX-Filer.*$"))
  (below #f)
)

Does not behave as expected. Windows are not raised from below to normal. Switching to (above #t) shows me that the rule works.
Posted by foosel at Sat Dec 10 15:16:17 2005:
Don't know if it's of use to anyone here, but I wrote together a small documentation of the new configuration syntax and the function names used since version 0.13, which can be found at http://wiki.foosel.net/linux/devilspie

Ross, thanks for making Devil's Pie, I love that tool.
Posted by foosel at Sat Dec 10 15:20:03 2005:
Hm, just saw the post by lenix some comments above. Well, I hope two tries at a documentation won't hurt anyone :)
Posted by Josh Reynolds at Mon Dec 12 12:50:42 2005:
Hi everybody.  Love the devilspie.  I wrote an xslt to convert from the old xml to multiple s-expression documents.

Check it out at
http://ubuntuforums.org/showthread.php?p=566367

Cheers,
Josh

PS thanks for the docs foosel.
Posted by Steve at Thu Jan 19 09:40:07 2006:
I wrote a simple introduction to Devil's Pie for Debian users.  It is a great tool:

http://www.debian-administration.org/articles/335
Posted by Alec Thomas at Wed Feb 22 04:11:32 2006:
Josh, I have your XSL template a whirl and it seems quite good. Only slight issue is that if there is a (debug) statement with one action it generates an S-expression like the following, which is not quite right:

(if
  (is (application_name ) "atermfs" )
  (debug)
  (maximize)
)

The (debug) and (maximize) need to be in their own (begin) block.

Name:


E-mail:


URL:


Add 3 and 5 (required):


Comment: