desktop 'tape'

Matthew Weier OPhinney matthew-lists at weierophinney.net
Mon Mar 29 02:03:07 CEST 2004


-- Benjamin Rich <benxor at cracksmokingducks.com> wrote
(on Monday, 29 March 2004, 09:42 AM +1000):
> Using devilspie, and it's quite good more getting my mailer over to
> desktop-1 regardless - but can it move new windows to free workspaces?

I suspect you'd want to use wmctrl for that. Unfortunately, that would
mean you'd have to make a kind of universal wrapper that would:

1) use wmctrl to see what windows were open and on what workspaces
2) determine which workspace(s) were empty
3) execute the program requested, and 
4) move it to the first empty workspace, if any.

That would be difficult because the wrapper may or may not know what the
window title will be for the newly run application, unless it had some
sort of lookup table. (One possibility would be to get the PID of the
application when it gets exec'd, then lookup the window ID based on that
PID -- I believe wmtrl can do that last bit.) Perl is probably the tool
you'd want to glue all this together, though.

It's pretty advanced behaviour you're looking for, and I don't see a
good way of doing it reliably or easily without wrapping such
functionality into the WM -- and I'm pretty certain that Olivier doesn't
want this functionality (based on comments made previously on this
list).

If you come up with a solution, post it to the list!

> On Sun, 2004-03-28 at 00:51, Matthew Weier OPhinney wrote:
> > -- Benjamin Rich <benxor at cracksmokingducks.com> wrote
> > (on Saturday, 27 March 2004, 10:48 PM +1100):
> > > I was thinking of making this a feature request but it seemed too large
> > > to put in xfce-bugs, so here it is.
> > > 
> > > Situation: I use lots of desktops. Usually, in my multiple desktop
> > > pager, I have 7 desktops, 5 or 6 of which I end up using. I do this
> > > mainly because a) I use a lot of different applications and b) every
> > > major application needs a full screen to itself. GIMP, gFTP, Quanta,
> > > Evolution, etc. all require pretty much an entire screen to themselves
> > > for you to use them properly - hence, a desktop for each major app
> > > running.
> > > 
> > > Problem: In XFCE4, there seems to be no way of getting a window to load
> > > in the desktop it was spawned in. If I click the icon for firefox, and
> > > it takes 12seconds to load and display (being that it's firefox =P ),
> > > then I have to make sure I'm in a blank desktop when that moment arrives
> > > - or at least that I am where I want the app to load. Likewise, when I
> > > save a session with a copy of Evolution running in desktop1, when I load
> > > up XFCE4 again, Evolution will load only in desktop1 if I'm there at the
> > > time.
> > 
> > You might want to look into wmctrl or devilspie. I use wmctrl and create
> > wrapper scripts that look something like:
> >     #!/bin/bash
> >     mailer &
> >     sleep 5
> >     wmctrl -r mailer -t 3
> > and then it will launch my mailer and place it on workspace 4
> > (workspaces are numbered 0-3...). Devilspie might be more your style,
> > however -- you create a config and devilspie runs in the background and
> > applies settings to windows as they're spawned.
> > 
> > This solution is nice -- now I don't need to worry about which window
> > manager I'm using (unless it's not netwm compliant!), and I get the same
> > behaviour.

-- 
Matthew Weier O'Phinney
http://weierophinney.net/matthew/



More information about the Xfce4-dev mailing list