What is devilspie?

devilspie is a non-gui utility that lets you make applications start in specified workplaces, in specified sizes and placements, minimized or maximized and much more based on simple config files. The homepage can be found here

The gui

A simple fully capable gui has been written, gdevilspie, by a different author. If you install it you will likely not need this page as it is pretty self-explanatory.

How can I get it?

Install the devilspie package from the Universe repository.

How do I set it up?

How do I use it?

Examples

Background for this setup: A dual-screen workspace where the smaller (laptop) screen is used solely for "communications" (IRC and IM windows). The goal is to get three windows (xchat, Pidgin buddy list and Pidgin chat window) into pre-set locations wasting as little screen estate as possible.

+--------+------------------------+
| Pidgin |                        |
| Buddy  |        Pidgin          |
| List   |     Conversation       |
|        |                        |
|        +------------------------+
|        |                        |
|        |        Xchat           |
|        |                        |
|        |                        |
+--------+------------------------+

pidgin.ds

Buddy list and conversation window are undecorated (no titles or borders), moved and resized. Buddy list is also removed from task list (so it won't show up in Window list). Note: Even with 'undecorate' the conversation window seems to have a some border, this is the reason for some additional pixels there...

(if (is (application_name) "Pidgin")
        (begin
                (if (is (window_role) "buddy_list")
                        (begin
                                (undecorate)
                                (skip_tasklist)
                                (geometry "199x767+0+0")
                        )
                )
                (if (is (window_role) "conversation")
                        (begin
                                (undecorate)
                                (geometry "822x400+201+0")
                        )
                )
        )
)

xchat.ds

Xchat is undecorated (no titles or borders), moved and resized. Xchat main window does not have a window_role defined, but fortunately the other windows (like Preferences or Network List) do, so the empty match seems to work.

(and (is (application_name) "xchat")
     (is (window_role) "")
        (begin
                (undecorate)
                (geometry "823x363+200+404")
        )
)

How can I see what applications are currently running?

xlsclients -l

Window 0x4e00001:
  Machine:  sally
  Name:  Pidgin
  Icon Name:  pidgin
  Command:  pidgin
  Instance/Class:  pidgin/Pidgin

From the above, to match on pidgin requires (is (application_name) "Pidgin") and not (is (application_name) "pidgin")

How can I find the geometry of currently running applications?

/usr/bin/xwininfo

xwininfo: Please select the window about which you
          would like information by clicking the
          mouse in that window.

xwininfo: Window id: 0x5a0000a "xeyes"

  Absolute upper-left X:  1017
  Absolute upper-left Y:  347
  Relative upper-left X:  1
  Relative upper-left Y:  27
  Width: 172
  Height: 119
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +1017+347  -491+347  -491-584  +1017-584
  -geometry 172x119+1016+320

Autodesk Maya Users:

Maya users may need to use Devilspie to control Maya's Window functionality:

touch $HOME/.devilspie/Maya.ds
vim $HOME/.devilspie/Maya.ds

And add this line to the file:

(if (is (window_name) "Maya") (below))

Now Maya is under all it's children.

How can I improve this wiki page?

Simply add any useful stuff! Especially the section about setting up should be improved so that it more then just linking somewhere else, also some examples would be greatly appreciated. Also feel free to correct anything wrong.


CategorySoftware CategoryGraphics

Devilspie (last edited 2014-11-06 17:25:00 by 209)